Alexey Serbin has submitted this change and it was merged. ( 
http://gerrit.cloudera.org:8080/17305 )

Change subject: KUDU-2612: fix txn keepalive failover in Java client
......................................................................

KUDU-2612: fix txn keepalive failover in Java client

Prior to this patch, transaction keepalive heartbeater in Java client
wouldn't switch to a different TxnManager instance fast enough when
current TxnManager is no longer available (e.g., corresponding Kudu
master stopped or shutdown).  That might lead to unintended termination
of a multi-row transaction if a leader master was shutdown while the
transaction was in progress.  The issue was due to:
  * using long timeout (i.e. the default one) for issuing
    KeepTransactionAlive RPCs
  * sending KeepTransactionAlive RPCs synchronously on the client's
    HashedWheelTimer timer which was supposed to run only short tasks

This patch fixes the issue mentioned above and adds a new test scenario
which verifies that Kudu Java client switches to a different TxnManager
instance when the previously used one is no longer available.

Change-Id: I27ecbf3063d0657a20741088060d8562f8c40bc7
Reviewed-on: http://gerrit.cloudera.org:8080/17305
Tested-by: Alexey Serbin <aser...@cloudera.com>
Reviewed-by: Andrew Wong <aw...@cloudera.com>
---
M java/kudu-client/src/main/java/org/apache/kudu/client/AsyncKuduClient.java
M java/kudu-client/src/main/java/org/apache/kudu/client/KuduTransaction.java
M java/kudu-client/src/test/java/org/apache/kudu/client/TestKuduTransaction.java
3 files changed, 192 insertions(+), 60 deletions(-)

Approvals:
  Alexey Serbin: Verified
  Andrew Wong: Looks good to me, approved

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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I27ecbf3063d0657a20741088060d8562f8c40bc7
Gerrit-Change-Number: 17305
Gerrit-PatchSet: 4
Gerrit-Owner: Alexey Serbin <aser...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <aser...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Grant Henke <granthe...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)

Reply via email to