[
https://issues.apache.org/jira/browse/OAK-4600?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15393653#comment-15393653
]
Vikas Saurabh commented on OAK-4600:
------------------------------------
Test case (not committing yet)
{code}
// OAK-4600
@Test
public void nodeChildrenCacheForBranchCommit() throws Exception {
DocumentNodeStore ns = builderProvider.newBuilder().getNodeStore();
NodeBuilder b1 = ns.getRoot().builder();
//this would push cache entries
for (int i = 0; i < DocumentRootBuilder.UPDATE_LIMIT + 1; i++) {
b1.child("child" + i).child("subChild" + i);
}
//The fetch would happen on "br" format of revision
for (int i = 0; i < DocumentRootBuilder.UPDATE_LIMIT + 1; i++) {
Iterables.size(b1.getChildNode("child" + i).getChildNodeNames());
}
//must not have duplicated cache entries
assertTrue(ns.getNodeChildrenCacheStats().getElementCount() <
2*DocumentRootBuilder.UPDATE_LIMIT);
}
{code}
> In case of branch commits, nodeChildrenCache gets entries for branch revision
> without "br" prefix
> -------------------------------------------------------------------------------------------------
>
> Key: OAK-4600
> URL: https://issues.apache.org/jira/browse/OAK-4600
> Project: Jackrabbit Oak
> Issue Type: Bug
> Affects Versions: 1.2.16, 1.0.32, 1.5.5, 1.4.5
> Reporter: Vikas Saurabh
> Assignee: Vikas Saurabh
> Priority: Minor
>
> During branch commits, {{Commit#applyToCache}} sends bland revision string to
> {{nodeStore#applyChanges}}. In case of branch commits, the revision should be
> formatted to have {{br}} prefix.
> Note, the issue got resolved on trunk while OAK-4539 was implemented... so,
> currently this only affects branches and trunk <= 1.5.5.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)