You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@kudu.apache.org by "Dan Burkert (Code Review)" <ge...@cloudera.org> on 2016/09/30 22:06:17 UTC

[kudu-CR] Remove newlines from raft consensus.cc state logging

Hello David Ribeiro Alves, Todd Lipcon,

I'd like you to do a code review.  Please visit

    http://gerrit.cloudera.org:8080/4580

to review the following change.

Change subject: Remove newlines from raft_consensus.cc state logging
......................................................................

Remove newlines from raft_consensus.cc state logging

Removes an explicit newline from ReplicaState::ToStringUnlocked, which
was causing split log lines in raft_consensus.cc.

Before:

    I0930 15:01:06.197114 292159488 raft_consensus.cc:505] T 00000000000000000000000000000000 P a65e9f463a254ae1a7e34a1a8e4cc7cc [term 0 FOLLOWER]: Becoming Follower/Learner. State: Replica: a65e9f463a254ae1a7e34a1a8e4cc7cc, State: 1, Role: FOLLOWER
    Watermarks: {Received: term: 0 index: 0 Committed: term: 0 index: 0}

After:

    I0930 14:51:09.334908 360529920 raft_consensus.cc:505] T 00000000000000000000000000000000 P d2878bd460384b8ab58dd3aaf2c8f52d [term 0 FOLLOWER]: Becoming Follower/Learner. State: Replica: d2878bd460384b8ab58dd3aaf2c8f52d, State: 1, Role: FOLLOWER, Watermarks: {Received: term: 0 index: 0, Committed: term: 0 index: 0}

Change-Id: If1f3db96ece79e81b42bce4db51d37f14df14f50
---
M src/kudu/consensus/raft_consensus_state.cc
1 file changed, 4 insertions(+), 9 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/80/4580/1
-- 
To view, visit http://gerrit.cloudera.org:8080/4580
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: If1f3db96ece79e81b42bce4db51d37f14df14f50
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Dan Burkert <da...@cloudera.com>
Gerrit-Reviewer: David Ribeiro Alves <dr...@apache.org>
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>

[kudu-CR] Remove newlines from raft consensus.cc state logging

Posted by "Todd Lipcon (Code Review)" <ge...@cloudera.org>.
Todd Lipcon has submitted this change and it was merged.

Change subject: Remove newlines from raft_consensus.cc state logging
......................................................................


Remove newlines from raft_consensus.cc state logging

Removes an explicit newline from ReplicaState::ToStringUnlocked, which
was causing split log lines in raft_consensus.cc.

Before:

    I0930 15:01:06.197114 292159488 raft_consensus.cc:505] T 00000000000000000000000000000000 P a65e9f463a254ae1a7e34a1a8e4cc7cc [term 0 FOLLOWER]: Becoming Follower/Learner. State: Replica: a65e9f463a254ae1a7e34a1a8e4cc7cc, State: 1, Role: FOLLOWER
    Watermarks: {Received: term: 0 index: 0 Committed: term: 0 index: 0}

After:

    I0930 14:51:09.334908 360529920 raft_consensus.cc:505] T 00000000000000000000000000000000 P d2878bd460384b8ab58dd3aaf2c8f52d [term 0 FOLLOWER]: Becoming Follower/Learner. State: Replica: d2878bd460384b8ab58dd3aaf2c8f52d, State: 1, Role: FOLLOWER, Watermarks: {Received: term: 0 index: 0, Committed: term: 0 index: 0}

Change-Id: If1f3db96ece79e81b42bce4db51d37f14df14f50
Reviewed-on: http://gerrit.cloudera.org:8080/4580
Tested-by: Kudu Jenkins
Reviewed-by: David Ribeiro Alves <dr...@apache.org>
---
M src/kudu/consensus/raft_consensus_state.cc
1 file changed, 4 insertions(+), 9 deletions(-)

Approvals:
  David Ribeiro Alves: Looks good to me, approved
  Kudu Jenkins: Verified



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

Gerrit-MessageType: merged
Gerrit-Change-Id: If1f3db96ece79e81b42bce4db51d37f14df14f50
Gerrit-PatchSet: 2
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Dan Burkert <da...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@cloudera.com>
Gerrit-Reviewer: David Ribeiro Alves <dr...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>

[kudu-CR] Remove newlines from raft consensus.cc state logging

Posted by "Dan Burkert (Code Review)" <ge...@cloudera.org>.
Dan Burkert has posted comments on this change.

Change subject: Remove newlines from raft_consensus.cc state logging
......................................................................


Patch Set 1:

I found it confusing because it's not clear what it belongs to.  I thought it may have been a random write to stderr, before I realized it was connected to the line before.

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

Gerrit-MessageType: comment
Gerrit-Change-Id: If1f3db96ece79e81b42bce4db51d37f14df14f50
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Dan Burkert <da...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@cloudera.com>
Gerrit-Reviewer: David Ribeiro Alves <dr...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-HasComments: No

[kudu-CR] Remove newlines from raft consensus.cc state logging

Posted by "David Ribeiro Alves (Code Review)" <ge...@cloudera.org>.
David Ribeiro Alves has posted comments on this change.

Change subject: Remove newlines from raft_consensus.cc state logging
......................................................................


Patch Set 1: Code-Review+2

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

Gerrit-MessageType: comment
Gerrit-Change-Id: If1f3db96ece79e81b42bce4db51d37f14df14f50
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Dan Burkert <da...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@cloudera.com>
Gerrit-Reviewer: David Ribeiro Alves <dr...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-HasComments: No

[kudu-CR] Remove newlines from raft consensus.cc state logging

Posted by "David Ribeiro Alves (Code Review)" <ge...@cloudera.org>.
David Ribeiro Alves has posted comments on this change.

Change subject: Remove newlines from raft_consensus.cc state logging
......................................................................


Patch Set 1:

(should say I don't fell super-strongly about it either way, mostly just curious)

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

Gerrit-MessageType: comment
Gerrit-Change-Id: If1f3db96ece79e81b42bce4db51d37f14df14f50
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Dan Burkert <da...@cloudera.com>
Gerrit-Reviewer: David Ribeiro Alves <dr...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-HasComments: No

[kudu-CR] Remove newlines from raft consensus.cc state logging

Posted by "David Ribeiro Alves (Code Review)" <ge...@cloudera.org>.
David Ribeiro Alves has posted comments on this change.

Change subject: Remove newlines from raft_consensus.cc state logging
......................................................................


Patch Set 1:

did you have a specific problem with the new lines? it seems like it helps with finding the state easily, when eye-ball scanning the logs

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

Gerrit-MessageType: comment
Gerrit-Change-Id: If1f3db96ece79e81b42bce4db51d37f14df14f50
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Dan Burkert <da...@cloudera.com>
Gerrit-Reviewer: David Ribeiro Alves <dr...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-HasComments: No