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

MultiMap.put() inconsistent when key is locked by other #223

Closed
psfung opened this issue Aug 1, 2012 · 2 comments

Comments

Projects
None yet
2 participants
@psfung
Copy link

commented Aug 1, 2012

I tested MultiMap.put(key, value) when another node/thread is possibly holding the key lock, in Hazelcast 2.1.3.

In the test program https://gist.github.com/3224883, each node has

  1. A locker thread which locks and unlocks the key at random intervals.
  2. A putter thread which puts values to the key at random intervals, and counts the number of success and failures.

At the end, the map size is expected to equal the sum of success counts. However, the actual result is

node 1.
successCount=72
failureCount=0
node 2.
successCount=45
failureCount=31
node 3.
successCount=40
failureCount=0
final mapSize=116

41 (=72+45+40-116) values are lost. Besides, the failure counts in 2 nodes are 0, which is statistically impossible.

@ghost ghost assigned mdogan Aug 8, 2012

@mdogan mdogan closed this in ec303a8 Aug 8, 2012

mdogan added a commit that referenced this issue Aug 8, 2012

Fixes #223.
Fixes #228.
(cherry picked from commit ec303a8)
@psfung

This comment has been minimized.

Copy link
Author

commented Aug 9, 2012

I see the fix is in 2.1.4. When will it be released? Thanks.

@mdogan

This comment has been minimized.

Copy link
Member

commented Aug 9, 2012

In a month I guess.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.