David Ribeiro Alves has uploaded a new patch set (#2).

Change subject: [java] - Synchronize the removal of the TabletClient from 
client2tablets and ip2client
......................................................................

[java] - Synchronize the removal of the TabletClient from client2tablets and 
ip2client

When entries are added to the maps they are added under a synchronized block, 
but
since entries where never removed from client2tablets the removal was never 
synchronized.
This was causing an error under concurrency where a disconnect would remove the 
client
from both maps, but a simultaneous master lookup would not see the removal in 
ip2client
and thus expect that client2tablets still have the entry, which was no longer 
the case.

This makes it so that we remove the entries from both maps under the same lock 
we use
to add them.

I've ran the test 100 times without failures.

Change-Id: I86197aed50be52588c3debe590d660c709cddacd
---
M java/kudu-client/src/main/java/org/apache/kudu/client/AsyncKuduClient.java
1 file changed, 13 insertions(+), 21 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/80/4380/2
-- 
To view, visit http://gerrit.cloudera.org:8080/4380
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I86197aed50be52588c3debe590d660c709cddacd
Gerrit-PatchSet: 2
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: David Ribeiro Alves <dral...@apache.org>
Gerrit-Reviewer: David Ribeiro Alves <dral...@apache.org>
Gerrit-Reviewer: Jean-Daniel Cryans <jdcry...@apache.org>

Reply via email to