Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OAK-10812: DocumentNodeStore#diffManyChildren(...) may produce incorr… #1465

Open
wants to merge 3 commits into
base: trunk
Choose a base branch
from

Conversation

mbaedke
Copy link
Contributor

@mbaedke mbaedke commented May 16, 2024

…ect results in readonly mode

Added test case.

…ect results in readonly mode

Added test case.
@mbaedke
Copy link
Contributor Author

mbaedke commented May 16, 2024

Preliminary test. Please review if it makes any sense.

Copy link
Contributor

@stefan-egli stefan-egli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 for adding the test. It indeed highlights the problem in Utils.getMinTimestampForDiff ie in `RevisionVector.difference when in read-only mode.

Perhaps we can migrate it to use the virtual clock before the test gets unignored.

@mbaedke
Copy link
Contributor Author

mbaedke commented May 16, 2024

Potential fix: if in DocumentNodeStore#getMinExternalRevisions() we replace getClusterId() - which is 0 in readonly mode - with the configured cluster id, the problem disappears.

@stefan-egli
Copy link
Contributor

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?

@mbaedke
Copy link
Contributor Author

mbaedke commented May 17, 2024

@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.

…ect results in readonly mode

Added potential fix proposal.
@stefan-egli
Copy link
Contributor

(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..)

@mbaedke mbaedke requested a review from stefan-egli May 29, 2024 11:30
@mbaedke
Copy link
Contributor Author

mbaedke commented May 29, 2024

@stefan-egli , see ticket for an explanation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants