Alexey Serbin has posted comments on this change. ( http://gerrit.cloudera.org:8080/16358 )
Change subject: KUDU-2612 p9: anchor participant ops in WAL ...................................................................... Patch Set 3: (10 comments) http://gerrit.cloudera.org:8080/#/c/16358/3/src/kudu/consensus/log_anchor_registry.cc File src/kudu/consensus/log_anchor_registry.cc: http://gerrit.cloudera.org:8080/#/c/16358/3/src/kudu/consensus/log_anchor_registry.cc@63 PS3, Line 63: : Status LogAnchorRegistry::UpdateRegistration(int64_t log_index, : const std::string& owner, : LogAnchor* anchor) { : std::lock_guard<simple_spinlock> l(lock_); : RETURN_NOT_OK_PREPEND(UnregisterUnlocked(anchor), : "Unable to swap registration, anchor not registered"); : RegisterUnlocked(log_index, owner, anchor); : return Status::OK(); : } Once RegisterOrUpdate() is introduced, maybe it's time to get rid of UpdateRegistration() and use RegisterOrUpdate() at former call sites of UpdateRegistration()? http://gerrit.cloudera.org:8080/#/c/16358/3/src/kudu/gutil/map-util.h File src/kudu/gutil/map-util.h: http://gerrit.cloudera.org:8080/#/c/16358/3/src/kudu/gutil/map-util.h@619 PS3, Line 619: a single-parameter I guess this needs to be updated as well? http://gerrit.cloudera.org:8080/#/c/16358/3/src/kudu/tablet/tablet_replica-test-base.h File src/kudu/tablet/tablet_replica-test-base.h: http://gerrit.cloudera.org:8080/#/c/16358/3/src/kudu/tablet/tablet_replica-test-base.h@72 PS3, Line 72: for cases nit: is for cases ? http://gerrit.cloudera.org:8080/#/c/16358/3/src/kudu/tablet/tablet_replica-test-base.cc File src/kudu/tablet/tablet_replica-test-base.cc: http://gerrit.cloudera.org:8080/#/c/16358/3/src/kudu/tablet/tablet_replica-test-base.cc@83 PS3, Line 83: () nit: these parentheses might be omitted Also, can the 'resp' instance of WriteResponsePB be allocated on the stack in this context? http://gerrit.cloudera.org:8080/#/c/16358/3/src/kudu/tablet/txn_participant-test.cc File src/kudu/tablet/txn_participant-test.cc: http://gerrit.cloudera.org:8080/#/c/16358/3/src/kudu/tablet/txn_participant-test.cc@84 PS3, Line 84: have finer-grained nit: need a finer-grained ? http://gerrit.cloudera.org:8080/#/c/16358/3/src/kudu/tablet/txn_participant-test.cc@351 PS3, Line 351: vector<ParticipantOpPB::ParticipantOpType> nit: pass this by a cont reference? http://gerrit.cloudera.org:8080/#/c/16358/3/src/kudu/tablet/txn_participant-test.cc@439 PS3, Line 439: (gcable_size, 0); nit here and below: do you mind specifying the expected value first in ASSERT_EQ()? It's easier to read if this ever fails. http://gerrit.cloudera.org:8080/#/c/16358/3/src/kudu/tablet/txn_participant-test.cc@458 PS3, Line 458: TEST_F(TxnParticipantTest, TestActiveParticipantOpsAnchorWALs) { It seems the meat of this test scenario was stolen by the underpants gnomes: https://duckduckgo.com/?q=underpants+gnomes&t=h_&iax=images&ia=images :) http://gerrit.cloudera.org:8080/#/c/16358/3/src/kudu/tablet/txn_participant.h File src/kudu/tablet/txn_participant.h: http://gerrit.cloudera.org:8080/#/c/16358/3/src/kudu/tablet/txn_participant.h@84 PS3, Line 84: int64_t txn_id, log::LogAnchorRegistry* log_anchor_registry) Is it worth documenting these parameters? http://gerrit.cloudera.org:8080/#/c/16358/3/src/kudu/tablet/txn_participant.cc File src/kudu/tablet/txn_participant.cc: http://gerrit.cloudera.org:8080/#/c/16358/3/src/kudu/tablet/txn_participant.cc@64 PS3, Line 64: txn What's the meaning of not finding the required transaction? Could the permissive behavior of the method in that regard mask some issue? -- To view, visit http://gerrit.cloudera.org:8080/16358 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I936f0a345c4b6095f0d99b6dd244e3092ae3f9d7 Gerrit-Change-Number: 16358 Gerrit-PatchSet: 3 Gerrit-Owner: Andrew Wong <[email protected]> Gerrit-Reviewer: Alexey Serbin <[email protected]> Gerrit-Reviewer: Andrew Wong <[email protected]> Gerrit-Reviewer: Kudu Jenkins (120) Gerrit-Comment-Date: Fri, 28 Aug 2020 23:17:08 +0000 Gerrit-HasComments: Yes
