[
https://issues.apache.org/jira/browse/OAK-2646?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14366637#comment-14366637
]
Chetan Mehrotra commented on OAK-2646:
--------------------------------------
Based on internal discussion [~tmueller] had following thoughts
{quote}
I would try a different heuristic. I have discussed this with Julian on the
phone. One idea is, when reading a document, verify it is up to date by
checking that all parents are up to date.
It _could_ turn out that this is a bit costly if there are many additional
(cache-) accesses for each cache access (as many as there are parents). But it
might not be a problem at all, we don't know that. If it turns out it's a
problem, there are multiple possible solutions:
* Use a bloom filter for invalid documents (yeah bloom filter!), to avoid most
cache accesses.
* Make documents "hierarchy aware". For each document, also keep the parent in
memory, and add a direct, hard reference to it. That would be a bigger change I
think, and the risk is to run out of memory, because some documents might not
be correctly accounted for in the cache size calculation.
{quote}
> Look for alternative cache invalidation logic for better performance
> --------------------------------------------------------------------
>
> Key: OAK-2646
> URL: https://issues.apache.org/jira/browse/OAK-2646
> Project: Jackrabbit Oak
> Issue Type: Improvement
> Components: mongomk
> Reporter: Chetan Mehrotra
> Fix For: 1.2
>
>
> Current cache invalidation logic has a higher cost. For e.g. in one of the
> deployment following log was seen
> {noformat}
> 12.03.2015 09:24:25.579 *INFO* [DocumentNodeStore background thread]
> org.apache.jackrabbit.oak.plugins.document.DocumentNodeStore Background
> operations stats (clean:0, split:0, write:0, read:11848
> ReadStats{cacheStats:InvalidationResult{invalidationCount=4,
> upToDateCount=286761, cacheSize=300411, timeTaken=10589, queryCount=654,
> cacheEntriesProcessedCount=138633}, head:1, cache:11842, dispatch:5, purge:0}
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)