I don't think we disagree. I am fine with your definition "is_owner==!must_lock". But whether or not to lock (dbScanLock) is not the only question relevant here.
Immutable data does not have an owner: there is no need for any locking. Nevertheless (in the absence of garbage collection or ref counting) we must assign responsibility for deallocating the memory (unless the data remains life forever). This is signalled by a non-NULL dtor.
The other question is who has the relevant meta data? Again, for mutable data this is clearly the owner. For immutable data it could be the record or the field_log.
My refactor conflated all three notions: presence of a dtor == db_field_log is owner == db_field_log has the meta data. This is okay for mutable data but not for immutable.
The problem at hand, filters that allow to access info items, has these features: the data is immutable, so no owner; it has infinite life time, so there is no dtor; yet the meta data is held by the field_log, not the record.
This means we need another "degree of freedom": at least one extra bit, perhaps two. The design question is: precisely what meaning shall these bits have?
--
https://code.launchpad.net/~dirk.zimoch/epics-base/+git/epics-base/+merge/399414
Your team EPICS Core Developers is requested to review the proposed merge of ~dirk.zimoch/epics-base:FilterForInfoFields into epics-base:7.0.
- References:
- [Merge] ~dirk.zimoch/epics-base:FilterForInfoFields into epics-base:7.0 Dirk Zimoch via Core-talk
- Navigate by Date:
- Prev:
Re: [Merge] ~dirk.zimoch/epics-base:FilterForInfoFields into epics-base:7.0 mdavidsaver via Core-talk
- Next:
Build failed: epics-base base-alarm-msg-654 AppVeyor via Core-talk
- Index:
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
<2021>
2022
2023
2024
- Navigate by Thread:
- Prev:
Re: [Merge] ~dirk.zimoch/epics-base:FilterForInfoFields into epics-base:7.0 mdavidsaver via Core-talk
- Next:
Re: [Merge] ~dirk.zimoch/epics-base:FilterForInfoFields into epics-base:7.0 Dirk Zimoch via Core-talk
- Index:
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
<2021>
2022
2023
2024
|