OAK-10812: DocumentNodeStore#diffManyChildren(...) may produce incorr…
…ect results in readonly mode
Added test case.
Preliminary test. Please review if it makes any sense.
Potential fix: if in DocumentNodeStore#getMinExternalRevisions() we replace getClusterId() - which is 0 in readonly mode - with the configured cluster id, the problem disappears.
I'm wondering if that wouldn't introduce a regression elsewhere .. there must have been a reason this was set to 0 for read-only?
@stefan-egli , I understand that it's not supposed to collide with a simultaneously running read-write node. The proposal is not to change the cluster id, but to add an additional property to store the configured cluster id. That would probably not cover all scenarios, though, because the real cluster id may differ from the configured one.
(maybe we could add a test case to reproduce real being different than configured id - and then the result might be two additional properties would be required, real and configured..)
@stefan-egli , see ticket for an explanation.
PS: commented on the ticket
@mbaedke adding a check to handle the case where fromRev.pmin(minRevisions) results in an empty vector could fix the issue