Mike Percy has posted comments on this change. ( http://gerrit.cloudera.org:8080/10169 )
Change subject: KUDU-2214 Update logging to differentiate voting while copying/tombstoned ...................................................................... Patch Set 1: (4 comments) http://gerrit.cloudera.org:8080/#/c/10169/1/src/kudu/consensus/raft_consensus.cc File src/kudu/consensus/raft_consensus.cc: http://gerrit.cloudera.org:8080/#/c/10169/1/src/kudu/consensus/raft_consensus.cc@1561 PS1, Line 1561: LOG_WITH_PREFIX_UNLOCKED(INFO) << "voting based on last-logged opid " > Sure. The reason is that the log message today is misleading -- it says tha I like Todd's suggestion here and I think it's a good one. From a quick grep, it looks like the only places we call this function directly are tablet_service.cc and raft_consensus_quorum-test.cc. For raft_consensus_quorum-test.cc, we can simply pass { boost::none, TABLET_DATA_READY } to all call-sites, so I don't think it should be very disruptive to the callers. In tablet_service.cc we already have 'data_state' available at the call site. http://gerrit.cloudera.org:8080/#/c/10169/1/src/kudu/integration-tests/tablet_copy-itest.cc File src/kudu/integration-tests/tablet_copy-itest.cc: http://gerrit.cloudera.org:8080/#/c/10169/1/src/kudu/integration-tests/tablet_copy-itest.cc@1328 PS1, Line 1328: TEST_F(TabletCopyITest, TestTabletCopyVotingLog) { I don't think this test actually tests the change in this patch. Maybe we could parse the logs generated from existing tombstoned voting tests to validate this. However most of our logging-only changes don't actually come with a test because as far as I'm aware we haven't built helper infrastructure for that. We often manually validate logging changes. http://gerrit.cloudera.org:8080/#/c/10169/1/src/kudu/integration-tests/tablet_copy-itest.cc@1378 PS1, Line 1378: RequestVote nit: make this a complete sentence or maybe remove this comment? http://gerrit.cloudera.org:8080/#/c/10169/1/src/kudu/tserver/tablet_service.cc File src/kudu/tserver/tablet_service.cc: http://gerrit.cloudera.org:8080/#/c/10169/1/src/kudu/tserver/tablet_service.cc@1006 PS1, Line 1006: LOG(INFO) << "Attempting to vote while " > yes actually. I think it would be preferable to incorporate this into the code path in raft_consensus.cc instead of adding additional log lines, from a performance perspective as well as a usability perspective (we already have a log-spew problem) -- To view, visit http://gerrit.cloudera.org:8080/10169 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I07007601d0a86d6161065629ba167121a33635d6 Gerrit-Change-Number: 10169 Gerrit-PatchSet: 1 Gerrit-Owner: Fengling Wang <fw...@cloudera.com> Gerrit-Reviewer: Fengling Wang <fw...@cloudera.com> Gerrit-Reviewer: Kudu Jenkins Gerrit-Reviewer: Mike Percy <mpe...@apache.org> Gerrit-Reviewer: Todd Lipcon <t...@apache.org> Gerrit-Reviewer: Will Berkeley <wdberke...@gmail.com> Gerrit-Comment-Date: Tue, 01 May 2018 00:42:43 +0000 Gerrit-HasComments: Yes