forked from hazelcast/hazelcast
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Batch partition replica updates [HZ-3652] (hazelcast#25905)
Since Hazelcast IMDG 4.1 with the introduction of parallel migrations, the "partition assignments version", a monotonically increasing version number for the whole partition replica assignments data structure, was replaced with a "partition state stamp" - a hash calculated over individual partitions' version. On each partition replica assignment update, the partition state stamp needs to be recalculated. In certain cases, it is expected that all partition replica assignments will be updated: - during initial partitions assignment ("first arrangement") - when a member that joins the cluster applies the partition replica assignments, as received from master member - when a member recovers partition replica assignments from persistence In such cases, updating the partition state stamp on each partition replica update is inefficient. Instead, the partition state stamp can be updated just once, after the whole batch of partition replica assignments has been applied. Measured the following timings: - Initial partitions assignment on a single member with 20K partitions - current `master` branch: 3870 millis (20001 partition stamp updates) - with this PR: 28 millis (1 partition stamp update) - Apply initial partition state on the 3rd member joining a cluster with 2 members - current `master` branch: 3260 (40002 partition stamp updates) - with this PR: 4 millis (1 partition stamp update)
- Loading branch information
Showing
6 changed files
with
286 additions
and
24 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
Oops, something went wrong.