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

Stefan Egli commented on OAK-10812:
-----------------------------------

{quote}I think that we have to use the parallel minimum instead of the parallel 
maximum in this case. {quote}
Right, I think the bug lies in the fact that {{pmax}} was used for {{fromRev}} 
*and* {{toRev}} - while it seems like the correct way would have been to use 
{{pmin}} for {{fromRev}} and {{pmax}} for {{toRev}}.

Except, in the current state of 
[PR#1465|https://github.com/apache/jackrabbit-oak/pull/1465] that's not what 
the PR now contains. Instead of switching pmax to pmin it now does a read-only 
conditioned ignore of minRevision. I think that following the above mentioned 
conclusion, it should actually be a simple flip of

{noformat}
-        fromRev = fromRev.pmax(minRevisions);
+        fromRev = fromRev.pmin(minRevisions);
{noformat}

Btw, what might also be useful is to have that new diffManyChildrenReadOnlyMode 
test method in two variants (and then maybe call it different) : one for 
read-only and one for read-write. I understand the read-write one wouldn't be 
able to reuse clusterId 1 - as is currently coded in 
diffManyChildrenReadOnlyMode. So it would probably use clusterId 3. I have 
tested a read-write variant of that method and it indeed fails with the current 
code (that applies only to read-only mode - but in fact, the bug is independent 
of read-only mode).

> DocumentNodeStore#diffManyChildren(...) may produce incorrect results in 
> readonly mode
> --------------------------------------------------------------------------------------
>
>                 Key: OAK-10812
>                 URL: https://issues.apache.org/jira/browse/OAK-10812
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: documentmk
>            Reporter: Manfred Baedke
>            Assignee: Manfred Baedke
>            Priority: Major
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to