Hi,

Could someone review my PR in JCR-4007?

As explained in its javadoc,
org.apache.jackrabbit.core.gc.GarbageCollector is supposed to 'mark',
'sweep' and finally 'close' a collection cycle. So, before it starts,
it updates the timestamp through
DataStore#updateModifiedDateOnAccess(startScanTimestamp) to give the
underlying DataStore a chance to update the last modified timestamp of
a record which is being read during the collection cycle and so cannot
be removed by the GarbageCollector.
GarbageCollector is supposed to set the timestamp back to zero through
DataStore#updateModifiedDateOnAccess(startScanTimestamp) when it was
done.

Therefore, when a record is being read, a DataStore implementation is
supposed to update the last modified timestamp of a record *only if*
the timestamp is greater than zero (in other words, only if
GarbageCollector is working on).
FileDataStore works like this as designed. However, CachingDataStore
and DbDataStore don't seem to care that properly. My pull request is a
fix for CachingDataStore only at the moment.

Updating the record's timestamp on every read access doesn't sound
good in performance as well.

Thanks in advance,

Woonsan

Reply via email to