[
https://issues.apache.org/jira/browse/OAK-3878?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16214814#comment-16214814
]
Marcel Reutegger commented on OAK-3878:
---------------------------------------
bq. isn't it actually a bit dangerous to bypass the cache in these cases?
What do you mean with 'these cases'? Is this about the signature change
proposed earlier by Chetan? That is, adding a {{cacheResults}} parameter. If
yes, then the contract should be clear about what the impact is on subsequent
calls that may return cached documents. My preference is also to invalidate
cached documents if the implementation determines the cached document is
outdated. This ensures all changes visible in the non-cached result are also
visible in a subsequent potentially cached result.
On the other hand, if this is about the current BlobReferenceIterator
implementations ({{RDBBlobReferenceIterator}} and
{{MongoBlobReferenceIterator}}), then I think reading the documents should be
an implementation detail because the BlobReferenceIterator itself only returns
{{ReferencedBlob}} instances and not documents. The consistency guarantees of
the BlobReferenceIterator (currently not specified) may be slightly different
from the DocumentStore API.
> Avoid caching of NodeDocument while iterating in BlobReferenceIterator
> ----------------------------------------------------------------------
>
> Key: OAK-3878
> URL: https://issues.apache.org/jira/browse/OAK-3878
> Project: Jackrabbit Oak
> Issue Type: Improvement
> Components: documentmk
> Reporter: Chetan Mehrotra
> Assignee: Chetan Mehrotra
> Priority: Minor
> Fix For: 1.8
>
>
> {{BlobReferenceIterator}} in DocumentMK makes use of {{DocumentStore}} API to
> query the NodeDocument. This would cause all those NodeDocuments to be added
> to cache in DocumentStore. Due to this when blob gc is running cache usage
> would not be that effective due to all the associated churn.
> As these NodeDocument are only required for BlobGC logic and its not expected
> that this document would read again soon it would be better to skip caching
> of these documents within DocumentStore
> Similar requirement exist in VersionGC logic but there we use direct store
> based API which does not add such documents to the cache
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)