[ 
https://issues.apache.org/jira/browse/OAK-3878?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16210708#comment-16210708
 ] 

Vikas Saurabh commented on OAK-3878:
------------------------------------

I feel Julian's concern is valid in the sense that declarative javadoc should 
come into play only when there's no other way to safe-guard.

I think refresh-cache-if-already-cached could be a good enough mitigating 
strategy (as [~reschke]'s patch in OAK-6839 does).

That said, I was also wondering if DocumentStore could have an API which 
iterates all documents and takes a tranformation method so that 
BlobReferenceIterator could just ask document store to scan all documents and 
map those with a method like {{<ReferenceBlob> map(NodeDocument doc);}}. Btw, I 
understand this is going in the direction of "we need to re-look at 
DocumentStore API". I'm ok with refresh-cache strategy - just putting the 
thought here for the record.

> 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)

Reply via email to