David Ribeiro Alves has posted comments on this change.

Change subject: Cleanup/refactor tracking of consensus watermarks

Patch Set 6:


File src/kudu/consensus/consensus_queue.cc:

Line 137:   if (current_term != queue_state_.current_term) {
are we verifying that the term doesn't go back? should we?

Line 263:       // TODO: this code seems wrong. When we are leader, we've 
already bumped
yeah, this seems like it's making things a bit messier (not that they were much 
more nice and neat before). Would it be possible to create a new SetLeaderMode 
like method that also took the first round to be appended and that would set 
both the first index and do the SetLeaderMode stuff? Something like 
SetLeaderAndAppendNoOp then we would always snoop for both index and term (even 
f if you don't like snooping, at least we'd be consistent). This may not work 
great with the replicating peers though (right now we set leader mode, update 
the peers config and only then append the no op)

Line 459:     // TODO: The fact that we only consider peers whose last exchange 
this is technically true, but not sure how important/impactful it is. If A goes 
down we wouldn't be able to advance the index anyway, and we'll be able to 
again only once we've removed A and added a new node. So yeah, once we've 
stopped talking to a peer we stop moving the all_replicated and maybe we could 
advance it a little more, but IMO we should address it only if it becomes 
pathological. (not saying anything about the last_received, which I agree we 
should make match raft proper. iirc we actually tried to do that and hit some 

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I2aa294472f018013d88f36a9358e9ebd9d5ed8f8
Gerrit-PatchSet: 6
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Todd Lipcon <t...@apache.org>
Gerrit-Reviewer: David Ribeiro Alves <dral...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy <mpe...@apache.org>
Gerrit-Reviewer: Todd Lipcon <t...@apache.org>
Gerrit-HasComments: Yes

Reply via email to