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

Fix isMaster() guards in migration system #15618

Merged

Conversation

@mdogan
Copy link
Member

commented Sep 26, 2019

node.isMaster() was being used in migration mechanism
to detect whether or not a node is master. Depending on this
check, a process executes or rejects to execute.

But while a migration method is executing under partition service
lock, the node may become master (when former master leaves the cluster).
This may cause inconsistenct behaviours during execution of the specific method.

For example, master node increments partition version when a replica ownership
changes. If a node becomes master while appyling partition table updates,
the race mentioned above can cause multiple increments of partition version.

Fixes #hazelcast/hazelcast-enterprise#2837
Backport of #15617

`node.isMaster()` was being used in migration mechanism
to detect whether or not a node is master. Depending on this
check, a process executes or rejects to execute.

But while a migration method is executing under partition service
lock, the node may become master (when former master leaves the cluster).
This may cause inconsistenct behaviours during execution of the specific method.

For example, master node increments partition version when a replica ownership
changes. If a node becomes master while appyling partition table updates,
the race mentioned above can cause multiple increments of partition version.
@mdogan mdogan merged commit c7ec495 into hazelcast:maintenance-3.x Sep 27, 2019
1 check passed
1 check passed
default Test PASSed.
Details
@mdogan mdogan deleted the mdogan:partition-version-race-fix-x branch Sep 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.