Andrew Wong has posted comments on this change. ( http://gerrit.cloudera.org:8080/16527 )
Change subject: KUDU-2612: initial implementation of TxnManager ...................................................................... Patch Set 4: Code-Review+1 (10 comments) Overall looks good, mostly nits. http://gerrit.cloudera.org:8080/#/c/16527/3/src/kudu/master/master.cc File src/kudu/master/master.cc: http://gerrit.cloudera.org:8080/#/c/16527/3/src/kudu/master/master.cc@97 PS3, Line 97: true nit: perhaps keep this off until the rest of the feature lands? Though I suppose it shouldn't be an issue with lazy initialization. http://gerrit.cloudera.org:8080/#/c/16527/3/src/kudu/master/master.cc@318 PS3, Line 318: retry_interval nit: kConstStaticCase? http://gerrit.cloudera.org:8080/#/c/16527/3/src/kudu/master/master.cc@328 PS3, Line 328: if (!txn_manager_) { : return Status::IllegalState("TxnManager is not enabled"); : } Should we DCHECK this instead? Can we ever get here, given the other DCHECK we have in InitTxnManagerTask? http://gerrit.cloudera.org:8080/#/c/16527/3/src/kudu/master/master.cc@336 PS3, Line 336: CHECK_EQ(state_, kRunning); nit: reverse the order for expected and actual values http://gerrit.cloudera.org:8080/#/c/16527/3/src/kudu/master/txn_manager-test.cc File src/kudu/master/txn_manager-test.cc: http://gerrit.cloudera.org:8080/#/c/16527/3/src/kudu/master/txn_manager-test.cc@71 PS3, Line 71: void SetUp() override { nit: should we also explicitly set FLAGS_txn_manager_enabled to true? http://gerrit.cloudera.org:8080/#/c/16527/3/src/kudu/master/txn_manager-test.cc@151 PS3, Line 151: nit: exist http://gerrit.cloudera.org:8080/#/c/16527/3/src/kudu/master/txn_manager.h File src/kudu/master/txn_manager.h: http://gerrit.cloudera.org:8080/#/c/16527/3/src/kudu/master/txn_manager.h@109 PS3, Line 109: s the c nit: can we call this highest_seen_txn_id_ to clarify which transaction ID it is (e.g. not the next transaction ID, but an exclusive lower bound) http://gerrit.cloudera.org:8080/#/c/16527/3/src/kudu/master/txn_manager.proto File src/kudu/master/txn_manager.proto: http://gerrit.cloudera.org:8080/#/c/16527/3/src/kudu/master/txn_manager.proto@43 PS3, Line 43: log messages, : // though its error code is less specific. nit: combine lines? http://gerrit.cloudera.org:8080/#/c/16527/3/src/kudu/master/txn_manager.proto@93 PS3, Line 93: : nit: spacing http://gerrit.cloudera.org:8080/#/c/16527/1/src/kudu/transactions/txn_system_client.cc File src/kudu/transactions/txn_system_client.cc: http://gerrit.cloudera.org:8080/#/c/16527/1/src/kudu/transactions/txn_system_client.cc@62 PS1, Line 62: if (master_addrs.empty()) { : return Status::InvalidArgument("empty list of master addresses"); : } > Not sure I understand what you mean. In this context, the list if master a My real question is, should this be a CHECK or DCHECK failure instead of returning an error? Under what scenarios do we expect this to be empty? -- To view, visit http://gerrit.cloudera.org:8080/16527 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ie952977a3ae5f625d1283389f0be8afb79df7d8c Gerrit-Change-Number: 16527 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: Hao Hao <hao....@cloudera.com> Gerrit-Reviewer: Kudu Jenkins (120) Gerrit-Reviewer: Tidy Bot (241) Gerrit-Comment-Date: Mon, 12 Oct 2020 22:50:41 +0000 Gerrit-HasComments: Yes