-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* Fixes conditions for detection of rejoining members On non-master members, a gracefully shutdown master was detected as unexpectedly leaving the cluster and would fail to be admitted back to the cluster. Now a partition table snapshot is only saved for members which are still present in the partition table, avoiding the above scenario. A saved partition table snapshot is also a requirement for recognizing a member as rejoining the cluster. Also promotes some rather important log lines to INFO level. * Fixes NPE Introduced by de6140e * Offloadable partition replica sync is now enabled by default. System property to explicitly disable it is still available as a kill-switch. * Adds smart partition reassignment When persistence is enabled and a crashed member is rejoining, a stored partition table snapshot may be picked during repartitioning task, with a view to minimize partition rearrangement and migrations. An eligible partition table snapshot must include replica assignments to current members and not any of the shutting down members. If multiple such candidates are located, then the one with least "distance" from the current partition table is chosen. Distance calculation is the sum of all partitions' distance. For a given partition assignment, the distance calculation considers replica index assignments. If a given replica index is assigned to the same member in both partition assignments, then their distance is 0. If a member is assigned to replica index 0 and index 2 in the compared partitions, then the distance is incremented by 2. A replica index that is assigned in one but unassigned (null) in the other partition increments distance by MAX_REPLICA_COUNT. * Fixes race in offloaded anti-entropy It is only safe to read replica versions before preparing replication operations. Reasoning: even though partition is already marked as migrating, operations may be already queued in partition thread. If we read replica versions after replication operation is prepared, we may read updated replica versions but replication op may have stale data -> future backup sync checks will not detect the stale data. * Send retry response when partition is migrating Instead of just retrying locally, a retry response needs to be sent back to the replica sync requester, otherwise subsequent replica sync requests may be stuck up to migration timeout seconds (default 300sec) due to the previous sync request being leftover in the sync request registry (PartitionReplicaManager#replicaSyncRequests).
- Loading branch information
Showing
10 changed files
with
557 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.