forked from hazelcast/hazelcast
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make reloading the owned partitions in map service context thread safe
Since the migration finalizations can be called concurrently, the owned partitions might be reloaded concurrently. This means that the set of owned partitions first might be set to a newer version and then to an older version, leading to an incorrect set of owned partitions. This affects the query engine when it performs queries off the partition thread as every member reports its own set of owned partitions which is in this case incorrect. If the results from the actual partition owner are received by the query engine later than from the "lying" partition owner, they are discarded. This can cause the query engine to return incorrect results until the partitions are reloaded again on an another migration. The fix reloads the partitions in a CAS loop ensuring that the newest partition state will always be applied. Also, added some type parameters and improved javadoc. Fixes : hazelcast#10107 hazelcast#9870 hazelcast#10776
- Loading branch information
Matko Medenjak
committed
Sep 28, 2017
1 parent
93016e6
commit 7290048
Showing
6 changed files
with
34 additions
and
9 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