[kudu-CR] KUDU-2612: Java client sets txnId in WriteRequestPB

2020-10-24 Thread Alexey Serbin (Code Review)
Alexey Serbin has submitted this change and it was merged. ( 
http://gerrit.cloudera.org:8080/16644 )

Change subject: KUDU-2612: Java client sets txnId in WriteRequestPB
..

KUDU-2612: Java client sets txnId in WriteRequestPB

With this patch, WriteRequestPB messages generated by a transactional
AsyncKuduSession have their txnId field populated with corresponding
transaction identifier.  For more information about the assumed changes
in the client API see e64eb7c7ceceec76aeb5cceac9dc42cc0e78f1ec.

It's assumed that follow-up changelists will add more comprehensive
end-to-end coverage once transactional API for Kudu client is introduced
and tablet servers process the WriteRequestPB:txn_id field as prescribed
by the design document [1].

[1] https://s.apache.org/kudu-multi-row-transaction-design

Change-Id: I2863ae97541c2124230b3af31acc75d42cd4c6df
Reviewed-on: http://gerrit.cloudera.org:8080/16644
Tested-by: Kudu Jenkins
Reviewed-by: Andrew Wong 
---
M java/kudu-client/src/main/java/org/apache/kudu/client/AsyncKuduClient.java
M java/kudu-client/src/main/java/org/apache/kudu/client/AsyncKuduSession.java
M java/kudu-client/src/main/java/org/apache/kudu/client/Batch.java
M java/kudu-client/src/main/java/org/apache/kudu/client/Operation.java
4 files changed, 47 insertions(+), 2 deletions(-)

Approvals:
  Kudu Jenkins: Verified
  Andrew Wong: Looks good to me, approved

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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I2863ae97541c2124230b3af31acc75d42cd4c6df
Gerrit-Change-Number: 16644
Gerrit-PatchSet: 2
Gerrit-Owner: Alexey Serbin 
Gerrit-Reviewer: Alexey Serbin 
Gerrit-Reviewer: Andrew Wong 
Gerrit-Reviewer: Hao Hao 
Gerrit-Reviewer: Kudu Jenkins (120)


[kudu-CR] (wip) KUDU-2612: restrict TxnStatusManager calls to be made by the leader only

2020-10-24 Thread Hao Hao (Code Review)
Hao Hao has uploaded this change for review. ( 
http://gerrit.cloudera.org:8080/16648


Change subject: (wip) KUDU-2612: restrict TxnStatusManager calls to be made by 
the leader only
..

(wip) KUDU-2612: restrict TxnStatusManager calls to be made by the leader only

Currently, even though a non-leader TxnStatusManager will be unable to
write to the underlying table (in the Raft subsystem the write would be
aborted), we may want to restrict calls to be made by the leader
TxnStatusManagers only. The motivation is to provide a more robust system,
which avoids cases when the request was sent to a laggy follower, we may
end up failing the request with an error.

This patch introduces ScopedLeaderSharedLock (similar to the one in Catalog
Manager) to be used to ensure the requests were sent to leaders only and
to block all other operations while reloading the persistent transaction
status metadata upon leadership changes. Note that during failover the
leader replica will wait until in-flight ops in the previous consensus
term to be applied before reloading the metadata.

wip: add more tests.

Change-Id: I42c1ad095dcb4bdffcbe0ecf9631a60bac208c2a
---
M src/kudu/integration-tests/txn_status_table-itest.cc
M src/kudu/master/sys_catalog.cc
M src/kudu/tablet/tablet_replica-test-base.cc
M src/kudu/tablet/tablet_replica.cc
M src/kudu/tablet/tablet_replica.h
M src/kudu/tablet/txn_coordinator.h
M src/kudu/transactions/txn_status_manager-test.cc
M src/kudu/transactions/txn_status_manager.cc
M src/kudu/transactions/txn_status_manager.h
M src/kudu/tserver/tablet_copy_source_session-test.cc
M src/kudu/tserver/tablet_service.cc
M src/kudu/tserver/ts_tablet_manager.cc
M src/kudu/tserver/ts_tablet_manager.h
13 files changed, 398 insertions(+), 22 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/48/16648/1
--
To view, visit http://gerrit.cloudera.org:8080/16648
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I42c1ad095dcb4bdffcbe0ecf9631a60bac208c2a
Gerrit-Change-Number: 16648
Gerrit-PatchSet: 1
Gerrit-Owner: Hao Hao 


[kudu-CR] [catalog manager] fix the typo in the comment for 'leader lock '

2020-10-24 Thread Hao Hao (Code Review)
Hao Hao has uploaded this change for review. ( 
http://gerrit.cloudera.org:8080/16646


Change subject: [catalog manager] fix the typo in the comment for 'leader_lock_'
..

[catalog manager] fix the typo in the comment for 'leader_lock_'

Change-Id: I09152727d079e1eb3c4afe9eb13181c43c9331ce
---
M src/kudu/master/catalog_manager.h
1 file changed, 1 insertion(+), 1 deletion(-)



  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/46/16646/1
--
To view, visit http://gerrit.cloudera.org:8080/16646
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I09152727d079e1eb3c4afe9eb13181c43c9331ce
Gerrit-Change-Number: 16646
Gerrit-PatchSet: 1
Gerrit-Owner: Hao Hao 


[kudu-CR] Remove redundant code in TabletReplica

2020-10-24 Thread Hao Hao (Code Review)
Hao Hao has uploaded this change for review. ( 
http://gerrit.cloudera.org:8080/16647


Change subject: Remove redundant code in TabletReplica
..

Remove redundant code in TabletReplica

Change-Id: I506d1522ccdbf1bef6df54b19222d9c6b91789b6
---
M src/kudu/tablet/tablet_replica.h
1 file changed, 0 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/47/16647/1
--
To view, visit http://gerrit.cloudera.org:8080/16647
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I506d1522ccdbf1bef6df54b19222d9c6b91789b6
Gerrit-Change-Number: 16647
Gerrit-PatchSet: 1
Gerrit-Owner: Hao Hao