You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@kudu.apache.org by "David Ribeiro Alves (Code Review)" <ge...@cloudera.org> on 2016/11/08 04:29:18 UTC

[kudu-CR] Rename LogicalClock::NowForMetrics() to GetCurrentTime()

David Ribeiro Alves has uploaded a new change for review.

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

Change subject: Rename LogicalClock::NowForMetrics() to GetCurrentTime()
......................................................................

Rename LogicalClock::NowForMetrics() to GetCurrentTime()

This renames this method and makes it public. The reasoning is
twofold: NowForMetrics() used to actually increase the clock's
value, which doesn't seem right; It's handy to be able to get
the clock's current value for tests.

Change-Id: Iac6f8dd9e79657b81409127e539e509da4b2b8de
---
M src/kudu/server/logical_clock.cc
M src/kudu/server/logical_clock.h
2 files changed, 6 insertions(+), 6 deletions(-)


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iac6f8dd9e79657b81409127e539e509da4b2b8de
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: David Ribeiro Alves <dr...@apache.org>

[kudu-CR] Rename LogicalClock::NowForMetrics() to GetCurrentTime()

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

Change subject: Rename LogicalClock::NowForMetrics() to GetCurrentTime()
......................................................................


Rename LogicalClock::NowForMetrics() to GetCurrentTime()

This renames this method and makes it public. The reasoning is
twofold: NowForMetrics() used to actually increase the clock's
value, which doesn't seem right; It's handy to be able to get
the clock's current value for tests.

Change-Id: Iac6f8dd9e79657b81409127e539e509da4b2b8de
Reviewed-on: http://gerrit.cloudera.org:8080/4989
Tested-by: Kudu Jenkins
Reviewed-by: Jean-Daniel Cryans <jd...@apache.org>
---
M src/kudu/server/logical_clock.cc
M src/kudu/server/logical_clock.h
2 files changed, 6 insertions(+), 6 deletions(-)

Approvals:
  Jean-Daniel Cryans: Looks good to me, approved
  Kudu Jenkins: Verified



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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iac6f8dd9e79657b81409127e539e509da4b2b8de
Gerrit-PatchSet: 6
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: David Ribeiro Alves <dr...@apache.org>
Gerrit-Reviewer: David Ribeiro Alves <dr...@apache.org>
Gerrit-Reviewer: Dinesh Bhat <di...@cloudera.com>
Gerrit-Reviewer: Jean-Daniel Cryans <jd...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy <mp...@apache.org>
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>

[kudu-CR] Rename LogicalClock::NowForMetrics() to GetCurrentTime()

Posted by "Jean-Daniel Cryans (Code Review)" <ge...@cloudera.org>.
Jean-Daniel Cryans has posted comments on this change.

Change subject: Rename LogicalClock::NowForMetrics() to GetCurrentTime()
......................................................................


Patch Set 5: Code-Review+2

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Iac6f8dd9e79657b81409127e539e509da4b2b8de
Gerrit-PatchSet: 5
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: David Ribeiro Alves <dr...@apache.org>
Gerrit-Reviewer: David Ribeiro Alves <dr...@apache.org>
Gerrit-Reviewer: Dinesh Bhat <di...@cloudera.com>
Gerrit-Reviewer: Jean-Daniel Cryans <jd...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy <mp...@apache.org>
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-HasComments: No

[kudu-CR] Rename LogicalClock::NowForMetrics() to GetCurrentTime()

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

Change subject: Rename LogicalClock::NowForMetrics() to GetCurrentTime()
......................................................................


Patch Set 2: Code-Review+1

Nit: Is there a reason to keep the same naming convention for HybridClock::NowForMetrics ?

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Iac6f8dd9e79657b81409127e539e509da4b2b8de
Gerrit-PatchSet: 2
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: David Ribeiro Alves <dr...@apache.org>
Gerrit-Reviewer: Dinesh Bhat <di...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-HasComments: No

[kudu-CR] Rename LogicalClock::NowForMetrics() to GetCurrentTime()

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

Change subject: Rename LogicalClock::NowForMetrics() to GetCurrentTime()
......................................................................


Patch Set 2:

Dinesh: Yeah I saw that and I pondered what you are suggesting. Ended up not doing it because in the HybridClock::NowForMetrics is really just used for metrics and does actually update the clocks's logical value if needed. For a clock with a physical component this makes sense: we want it to read the latest time. However for a logical clock just getting the current time shouldn't change it.

It bummed me a little bit to break the symmetry, but since these are not virtual methods I resigned to living with it :)

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Iac6f8dd9e79657b81409127e539e509da4b2b8de
Gerrit-PatchSet: 2
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: David Ribeiro Alves <dr...@apache.org>
Gerrit-Reviewer: David Ribeiro Alves <dr...@apache.org>
Gerrit-Reviewer: Dinesh Bhat <di...@cloudera.com>
Gerrit-Reviewer: Jean-Daniel Cryans <jd...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy <mp...@apache.org>
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-HasComments: No

[kudu-CR] Rename LogicalClock::NowForMetrics() to GetCurrentTime()

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

Change subject: Rename LogicalClock::NowForMetrics() to GetCurrentTime()
......................................................................


Patch Set 3:

> Dinesh: Yeah I saw that and I pondered what you are suggesting.
 > Ended up not doing it because in the HybridClock::NowForMetrics is
 > really just used for metrics and does actually update the clocks's
 > logical value if needed. For a clock with a physical component this
 > makes sense: we want it to read the latest time. However for a
 > logical clock just getting the current time shouldn't change it.
 > 
 > It bummed me a little bit to break the symmetry, but since these
 > are not virtual methods I resigned to living with it :)

Sounds good, thank you for explaining, I was lazy enough to not to look into the definition of HybridClock::Now() earlier.

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Iac6f8dd9e79657b81409127e539e509da4b2b8de
Gerrit-PatchSet: 3
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: David Ribeiro Alves <dr...@apache.org>
Gerrit-Reviewer: David Ribeiro Alves <dr...@apache.org>
Gerrit-Reviewer: Dinesh Bhat <di...@cloudera.com>
Gerrit-Reviewer: Jean-Daniel Cryans <jd...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy <mp...@apache.org>
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-HasComments: No

[kudu-CR] Rename LogicalClock::NowForMetrics() to GetCurrentTime()

Posted by "David Ribeiro Alves (Code Review)" <ge...@cloudera.org>.
Hello Dinesh Bhat, Kudu Jenkins,

I'd like you to reexamine a change.  Please visit

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

to look at the new patch set (#4).

Change subject: Rename LogicalClock::NowForMetrics() to GetCurrentTime()
......................................................................

Rename LogicalClock::NowForMetrics() to GetCurrentTime()

This renames this method and makes it public. The reasoning is
twofold: NowForMetrics() used to actually increase the clock's
value, which doesn't seem right; It's handy to be able to get
the clock's current value for tests.

Change-Id: Iac6f8dd9e79657b81409127e539e509da4b2b8de
---
M src/kudu/server/logical_clock.cc
M src/kudu/server/logical_clock.h
2 files changed, 6 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/89/4989/4
-- 
To view, visit http://gerrit.cloudera.org:8080/4989
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Iac6f8dd9e79657b81409127e539e509da4b2b8de
Gerrit-PatchSet: 4
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: David Ribeiro Alves <dr...@apache.org>
Gerrit-Reviewer: David Ribeiro Alves <dr...@apache.org>
Gerrit-Reviewer: Dinesh Bhat <di...@cloudera.com>
Gerrit-Reviewer: Jean-Daniel Cryans <jd...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy <mp...@apache.org>
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>