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
AssertionError: nodeId out of range: -1 invokeWithArguments(MethodHandle.java:627) #16609
Comments
4.1-SNAPSHOT (20200225 - 8b8c625, 4fa4827)
|
There appears to be a race in a proxy initialization. Consider this: There is a newly created flake id proxy and 2 user threads accessing the same proxy ends up in the The first thread enters the if branch and set the Then the 2nd thread will NOT enter the if branch (because Possible solution:
|
Fixes #16609 Reasoning: The `nextNodeIdUpdate` timestamp was updated BEFORE the `nodeId` field. This means when 2 threads were initializing the proxy concurrently then the 2nd thread could see the timestamp already updated then skip the IF branch and return a stale version of nodeId - which was not updated yet. This problem is fixed by updating the timestamp after the nodeId field. Additionally when the IF branch is not taken we still have to dereference the nodeId field. Otherwise we would return a stale value we had dereferenced before the IF branch.
Fixes #16609 Reasoning: The `nextNodeIdUpdate` timestamp was updated BEFORE the `nodeId` field. This means when 2 threads were initializing the proxy concurrently then the 2nd thread could see the timestamp already updated then skip the IF branch and return a stale version of nodeId - which was not updated yet. This problem is fixed by updating the timestamp after the nodeId field.
Fixes #16609 Reasoning: The `nextNodeIdUpdate` timestamp was updated BEFORE the `nodeId` field. This means when 2 threads were initializing the proxy concurrently then the 2nd thread could see the timestamp already updated then skip the IF branch and return a stale version of nodeId - which was not updated yet. This problem is fixed by updating the timestamp after the nodeId field.
http://jenkins.hazelcast.com/view/freeze/job/freeze-all/13/console
Hazelcast Enterprise 4.1-SNAPSHOT (20200205 - 37bffaf, 1e23c41)
The text was updated successfully, but these errors were encountered: