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 9: (8 comments) http://gerrit.cloudera.org:8080/#/c/17159/9/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/9/src/kudu/integration-tests/txn_write_ops-itest.cc@352 PS9, Line 352: error.IsTimedOut() > nit: could you add a comment explaining why both IsAborted() and IsTimedOut Done http://gerrit.cloudera.org:8080/#/c/17159/9/src/kudu/tablet/ops/write_op.h File src/kudu/tablet/ops/write_op.h: http://gerrit.cloudera.org:8080/#/c/17159/9/src/kudu/tablet/ops/write_op.h@179 PS9, Line 179: locks > nit: lock? Done http://gerrit.cloudera.org:8080/#/c/17159/9/src/kudu/tablet/ops/write_op.cc File src/kudu/tablet/ops/write_op.cc: http://gerrit.cloudera.org:8080/#/c/17159/9/src/kudu/tablet/ops/write_op.cc@217 PS9, Line 217: rows > nit: row Done http://gerrit.cloudera.org:8080/#/c/17159/9/src/kudu/tablet/ops/write_op.cc@574 PS9, Line 574: completion_callback()->set_error(s, code); : return s; > nit: does it make sense to add CHECK(!s.ok()) before setting the error code Done as a DCHECK http://gerrit.cloudera.org:8080/#/c/17159/9/src/kudu/tablet/txn_participant-test.cc File src/kudu/tablet/txn_participant-test.cc: http://gerrit.cloudera.org:8080/#/c/17159/9/src/kudu/tablet/txn_participant-test.cc@525 PS9, Line 525: Status s = Write(0); : ASSERT_TRUE(s.IsAborted()) << s.ToString(); : ASSERT_STR_CONTAINS(s.ToString(), "partition lock that is held by another"); : : s = Write(0, kTxnTwo); : ASSERT_TRUE(s.IsAborted()) << s.ToString(); : ASSERT_STR_CONTAINS(s.ToString(), "partition lock that is held by another"); > nit: is it possible to turn this into a functor and reuse it in the code of Done http://gerrit.cloudera.org:8080/#/c/17159/9/src/kudu/tablet/txn_participant.h File src/kudu/tablet/txn_participant.h: http://gerrit.cloudera.org:8080/#/c/17159/9/src/kudu/tablet/txn_participant.h@115 PS9, Line 115: It is thus expected that repeat callers are taking : // the same lock > nit: is it possible to check for this invariant in the implementation of th Done http://gerrit.cloudera.org:8080/#/c/17159/9/src/kudu/tablet/txn_participant.h@117 PS9, Line 117: AcquirePartitionLock > nit: would AdoptPartitionLock() be a better name for this method? Done http://gerrit.cloudera.org:8080/#/c/17159/9/src/kudu/tablet/txn_participant.cc File src/kudu/tablet/txn_participant.cc: http://gerrit.cloudera.org:8080/#/c/17159/9/src/kudu/tablet/txn_participant.cc@78 PS9, Line 78: TabletServerErrorPB::Code code = tserver::TabletServerErrorPB::UNKNOWN_ERROR; > nit: maybe, move this under the 'if ()' clause below? Done -- 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: 9 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: Tue, 13 Apr 2021 23:03:28 +0000 Gerrit-HasComments: Yes