[
https://issues.apache.org/jira/browse/OAK-4320?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15266324#comment-15266324
]
Julian Reschke edited comment on OAK-4320 at 5/2/16 12:14 PM:
--------------------------------------------------------------
I had another look at the change, and it removes an optimization that I think
was useful; not re-parsing a document from the DB when we already have it in
the case (this was in {{runThroughCache()}}. Was that change intentional (in
that you think the optimization isn't worth the complexity?)?
I believe the methods in {{NodeDocumentCache}} should accept something like:
{noformat}
public interface NodeDocumentProvider {
public String getId();
public NodeDocument getDocument();
public NodeDocument getDocumentIfNewer(long modCount);
}
{noformat}
This would allow the DS implementations to return just a thin wrapper around
whatver is persisted, and to re-build the document only when it's needed.
was (Author: reschke):
I had another look at the change, and it removes an optimization that I think
was useful; not re-parsing a document from the DB when we already have it in
the case (this was in {{runThroughCache()}}. Was that change intentional (in
that you think the optimization isn't worth the complexity?)?
> Use the cache tracker in the RDB Document Store
> -----------------------------------------------
>
> Key: OAK-4320
> URL: https://issues.apache.org/jira/browse/OAK-4320
> Project: Jackrabbit Oak
> Issue Type: Improvement
> Components: documentmk, rdbmk
> Reporter: Tomek Rękawek
> Assignee: Tomek Rękawek
> Fix For: 1.6
>
> Attachments: OAK-4320.patch
>
>
> OAK-4112 introduced {{CacheChangesTracker}} mechanism, inspired by the
> {{QueryContext}} class, already present in the RDB DS.
> The tracker works on the {{NodeDocumentCache}} level, within the methods
> modifying the cache values, using the same {{NodeDocumentLocks}}, which may
> prevent potential concurrency problems, described in the comments to OAK-3566.
> We should synchronise both approaches, so the queries in Mongo and RDB uses
> the same logic to update their caches.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)