Andrew Wong has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/17159 )

Change subject: KUDU-2612: acquire and release partition lock
......................................................................


Patch Set 3:

(8 comments)

http://gerrit.cloudera.org:8080/#/c/17159/3/src/kudu/client/batcher.cc
File src/kudu/client/batcher.cc:

http://gerrit.cloudera.org:8080/#/c/17159/3/src/kudu/client/batcher.cc@530
PS3, Line 530:     //                Status::Abort() originated from 
TabletServerErrorPB::TXN_LOCKED_ABORT
             :     //                response are needlessly retried.
             :
Isn't this handled above? Or do you mean TXN_LOCKED_RETRY? We'd probably be 
better off if we handled TXN_LOCKED_RETRY_OP explicitly and treated it as 
SERVICE_UNAVAILABLE or somesuch.


http://gerrit.cloudera.org:8080/#/c/17159/3/src/kudu/integration-tests/txn_write_ops-itest.cc
File src/kudu/integration-tests/txn_write_ops-itest.cc:

http://gerrit.cloudera.org:8080/#/c/17159/3/src/kudu/integration-tests/txn_write_ops-itest.cc@1046
PS3, Line 1046: }
nit: for completeness sake, maybe commit `second_txn` and ensure we no longer 
have dispatchers? Same below?


http://gerrit.cloudera.org:8080/#/c/17159/2/src/kudu/tablet/ops/participant_op.h
File src/kudu/tablet/ops/participant_op.h:

http://gerrit.cloudera.org:8080/#/c/17159/2/src/kudu/tablet/ops/participant_op.h@75
PS2, Line 75:  lock_manag
nit: the lock wasn't acquired by this op, it was acquired by txn_.


http://gerrit.cloudera.org:8080/#/c/17159/2/src/kudu/tablet/ops/participant_op.cc
File src/kudu/tablet/ops/participant_op.cc:

http://gerrit.cloudera.org:8080/#/c/17159/2/src/kudu/tablet/ops/participant_op.cc@108
PS2, Line 108: else {
nit: use LOG(FATAL) or LOG(DFATAL).


http://gerrit.cloudera.org:8080/#/c/17159/3/src/kudu/tablet/ops/write_op.cc
File src/kudu/tablet/ops/write_op.cc:

http://gerrit.cloudera.org:8080/#/c/17159/3/src/kudu/tablet/ops/write_op.cc@67
PS3, Line 67: DEFINE_bool(enable_write_op_partition_lock, true,
            :             "Whether or not to enable partition lock for write 
op");
            : TAG_FLAG(enable_write_op_partition_lock, advanced);
            : TAG_FLAG(enable_write_op_partition_lock, experimental);
Could we just reuse --enable_txn_partition_lock? When might we want to set them 
to different values?


http://gerrit.cloudera.org:8080/#/c/17159/3/src/kudu/tablet/ops/write_op.cc@569
PS3, Line 569:       DCHECK(false) << "unexpected error code " << code;
LOG(DFATAL) or LOG(FATAL)?


http://gerrit.cloudera.org:8080/#/c/17159/3/src/kudu/tablet/txn_participant.h
File src/kudu/tablet/txn_participant.h:

http://gerrit.cloudera.org:8080/#/c/17159/3/src/kudu/tablet/txn_participant.h@220
PS3, Line 220:     partition_lock_ = std::move(partition_lock);
nit: maybe DCHECK or CHECK that we own the lock?


http://gerrit.cloudera.org:8080/#/c/17159/3/src/kudu/transactions/participant_rpc.cc
File src/kudu/transactions/participant_rpc.cc:

http://gerrit.cloudera.org:8080/#/c/17159/3/src/kudu/transactions/participant_rpc.cc@180
PS3, Line 180:       case TabletServerErrorPB::TXN_LOCKED_ABORT:
Can we also explicitly handle TXN_LOCKED_RETRY_OP?



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: If26733cae16810f3b3afd1fd05dcb984e6366939
Gerrit-Change-Number: 17159
Gerrit-PatchSet: 3
Gerrit-Owner: Hao Hao <hao....@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <aser...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Hao Hao <hao....@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Comment-Date: Thu, 11 Mar 2021 20:58:26 +0000
Gerrit-HasComments: Yes

Reply via email to