Jean-Daniel Cryans has submitted this change and it was merged. Change subject: KUDU-1364. Don't clear the cache when a server disconnect ......................................................................
KUDU-1364. Don't clear the cache when a server disconnect Folks seem to agree that, in the Java client, clearing the cache when a server gets disconnected (for any reason) is not a good idea. This patch does major surgery on how we handle cached TabletClients. We now always keep them in RemoteTablet, and do our best to remember if they were a leader. Only the ip2client is being removed from. We now rely on the TabletClient's 'dead' attribute to know if a connection is stale and needs to be re-established. Not clear if client2tablets really needs to be removed from, and when. We'll probably only remove from it in the future when we support dropping ranges. The patch also introduces a new integration test for the client. It's still super basic but gives more confidence in the change. It also fixes a dumb bug that was killing scanners too soon if there was a disconnection. Change-Id: I8606bfcedb09af57b66ba0f065067f0f3335a4a8 Reviewed-on: http://gerrit.cloudera.org:8080/2449 Tested-by: Kudu Jenkins Reviewed-by: Adar Dembo <[email protected]> --- M java/kudu-client/src/main/java/org/kududb/client/AsyncKuduClient.java M java/kudu-client/src/main/java/org/kududb/client/AsyncKuduScanner.java M java/kudu-client/src/main/java/org/kududb/client/TabletClient.java A java/kudu-client/src/test/java/org/kududb/client/ITClient.java M java/kudu-client/src/test/java/org/kududb/client/TestAsyncKuduClient.java 5 files changed, 591 insertions(+), 66 deletions(-) Approvals: Adar Dembo: Looks good to me, approved Kudu Jenkins: Verified -- To view, visit http://gerrit.cloudera.org:8080/2449 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8606bfcedb09af57b66ba0f065067f0f3335a4a8 Gerrit-PatchSet: 7 Gerrit-Project: kudu Gerrit-Branch: master Gerrit-Owner: Jean-Daniel Cryans Gerrit-Reviewer: Adar Dembo <[email protected]> Gerrit-Reviewer: Dan Burkert <[email protected]> Gerrit-Reviewer: Jean-Daniel Cryans Gerrit-Reviewer: Kudu Jenkins
