[
https://issues.apache.org/jira/browse/OAK-4601?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15393686#comment-15393686
]
Vikas Saurabh edited comment on OAK-4601 at 7/26/16 12:12 PM:
--------------------------------------------------------------
Further investigation showed that a test like \[0] gets 1 branch with
base={{rBase}}, 1commit={rCommit}}. The cache entries in node cache show up for
# {{childX\@brCommit}}
# {{/\@brCommit}}
# {{/\@rBase}}
# {{/\@brBase}}
[~mreutegg] pointed out that technically, both #3 and #4 are correct
semantically although they carry the same information from node state pov and
could potentially be avoided. But, that's too minor a space waste to worry
about.... resolving as not a problem. Added a test at
[r1754117|https://svn.apache.org/r1754117] anyway to guard against the initial
suspicion of the issue (too many dups similar to OAK-4600)
\[0]:
{code}
@Test
public void nodeCacheForBranchCommit() throws Exception {
DocumentNodeStore ns = builderProvider.newBuilder().getNodeStore();
NodeBuilder b1 = ns.getRoot().builder();
final int NUM_CHILDREN = 3*DocumentRootBuilder.UPDATE_LIMIT + 1;
//this would push cache entries -> #nodes=3*update_limit
for (int i = 0; i < NUM_CHILDREN; i++) {
b1.child("child" + i);
}
//this would pull in cache entries
for (int i = 0; i < NUM_CHILDREN; i++) {
b1.getChildNode("child" + i);
}
}
{code}
was (Author: catholicon):
Further investigation showed that a test like \[0] gets 1 branch with
base={{rBase}}, 1commit={rCommit}}. The cache entries in node cache show up for
# {{childX\@brCommit}}
# {{/\@brCommit}}
# {{/\@rBase}}
# {{/\@brBase}}
[~mreutegg] pointed out that technically, both #3 and #4 are correct
semantically although they carry the same information from node state pov and
could potentially be avoided. But, that's too minor a space waste to worry
about.... resolving as not a problem. Added a test at
[r1754117|https://svn.apache.org/r1754117] anyway.
\[0]:
{code}
@Test
public void nodeCacheForBranchCommit() throws Exception {
DocumentNodeStore ns = builderProvider.newBuilder().getNodeStore();
NodeBuilder b1 = ns.getRoot().builder();
final int NUM_CHILDREN = 3*DocumentRootBuilder.UPDATE_LIMIT + 1;
//this would push cache entries -> #nodes=3*update_limit
for (int i = 0; i < NUM_CHILDREN; i++) {
b1.child("child" + i);
}
//this would pull in cache entries
for (int i = 0; i < NUM_CHILDREN; i++) {
b1.getChildNode("child" + i);
}
}
{code}
> In case of branch commits, nodeCache gets entries for branch revision without
> "br" prefix
> -----------------------------------------------------------------------------------------
>
> Key: OAK-4601
> URL: https://issues.apache.org/jira/browse/OAK-4601
> Project: Jackrabbit Oak
> Issue Type: Bug
> Reporter: Vikas Saurabh
> Assignee: Vikas Saurabh
> Priority: Minor
>
> Similar to OAK-4600, nodeCache also gets cached entries without {{br}}
> prefix. Still investigating when/where are those entries created.
> Btw, unlike, OAK-4600, this affects trunk too.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)