Andrew Wong has posted comments on this change.

Change subject: [consensus] Add consensus op-level lag metrics
......................................................................


Patch Set 12:

(3 comments)

http://gerrit.cloudera.org:8080/#/c/6451/12/src/kudu/consensus/consensus_queue.cc
File src/kudu/consensus/consensus_queue.cc:

PS12, Line 602: queue_state_.last_idx_appended_to_leader - 
queue_state_.last_appended.index()
> I don't think this is true, given where this is called in Consensus::Update
Right, seems like truncation happens before updating the lag metric.


PS12, Line 602: queue_state_.last_idx_appended_to_leader - 
queue_state_.last_appended.index()
> Just thought of one last thing. I think it is possible that the leader tell
Going off of David's comment, it seems truncation will occur when it checks the 
leader request (raft_consensus.cc:1137), which comes before we update the 
"last..to_leader". And this truncation will change the last_appended.


http://gerrit.cloudera.org:8080/#/c/6451/12/src/kudu/consensus/raft_consensus_quorum-test.cc
File src/kudu/consensus/raft_consensus_quorum-test.cc:

Line 981:   
ASSERT_EQ(follower->queue_->metrics_.num_ops_behind_leader->value(), 0);
> nit: the order should be ASSERT_EQ(expected, actual) in order to get a non-
Done and changed in the other test (there are a bunch of places where these are 
swapped, but won't touch those for this patch).


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ida8e992cc2397ca8d5873e62961a65f618d52c36
Gerrit-PatchSet: 12
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Andrew Wong <[email protected]>
Gerrit-Reviewer: Andrew Wong <[email protected]>
Gerrit-Reviewer: David Ribeiro Alves <[email protected]>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy <[email protected]>
Gerrit-Reviewer: Tidy Bot
Gerrit-Reviewer: Todd Lipcon <[email protected]>
Gerrit-HasComments: Yes

Reply via email to