You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@kudu.apache.org by "Alexey Serbin (Code Review)" <ge...@cloudera.org> on 2021/04/12 07:29:59 UTC

[kudu-CR] KUDU-2612: fix txn keepalive failover in Java client

Hello Kudu Jenkins, Andrew Wong, Grant Henke, 

I'd like you to reexamine a change. Please visit

    http://gerrit.cloudera.org:8080/17305

to look at the new patch set (#2).

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
---
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, 189 insertions(+), 60 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/05/17305/2
-- 
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: newpatchset
Gerrit-Change-Id: I27ecbf3063d0657a20741088060d8562f8c40bc7
Gerrit-Change-Number: 17305
Gerrit-PatchSet: 2
Gerrit-Owner: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)