Jean-Daniel Cryans has submitted this change and it was merged.

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
Reviewed-on: http://gerrit.cloudera.org:8080/4380
Tested-by: Kudu Jenkins
Reviewed-by: Jean-Daniel Cryans <jdcry...@apache.org>
---
M java/kudu-client/src/main/java/org/apache/kudu/client/AsyncKuduClient.java
1 file changed, 13 insertions(+), 21 deletions(-)

Approvals:
  Jean-Daniel Cryans: Looks good to me, approved
  Kudu Jenkins: Verified



-- 
To view, visit http://gerrit.cloudera.org:8080/4380
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I86197aed50be52588c3debe590d660c709cddacd
Gerrit-PatchSet: 3
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>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <t...@apache.org>

Reply via email to