You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@impala.apache.org by "Sailesh Mukil (Code Review)" <ge...@cloudera.org> on 2016/10/04 22:36:23 UTC

[Impala-ASF-CR] IMPALA-4246: SleepForMs() utility function has undefined behavior for > 1s

Sailesh Mukil has uploaded a new change for review.

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

Change subject: IMPALA-4246: SleepForMs() utility function has undefined behavior for > 1s
......................................................................

IMPALA-4246: SleepForMs() utility function has undefined behavior for > 1s

Our SleepForMs() function relied on usleep() which sleeps for 'n'
microseconds. However, the manpage for usleep() specifies that this
may not work for values > 1000000 us (or 1s).

This patch removes the use of usleep() and uses
std::this_thread::sleep_for() instead, which was introduced with C++11.

Change-Id: I06c55b1be287b264e7601c9c89788ae5929571cf
---
M be/src/util/time.cc
1 file changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/22/4622/1
-- 
To view, visit http://gerrit.cloudera.org:8080/4622
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I06c55b1be287b264e7601c9c89788ae5929571cf
Gerrit-PatchSet: 1
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Sailesh Mukil <sa...@cloudera.com>

[Impala-ASF-CR] IMPALA-4246: SleepForMs() utility function has undefined behavior for > 1s

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

Change subject: IMPALA-4246: SleepForMs() utility function has undefined behavior for > 1s
......................................................................


IMPALA-4246: SleepForMs() utility function has undefined behavior for > 1s

Our SleepForMs() function relied on usleep() which sleeps for 'n'
microseconds. However, the manpage for usleep() specifies that this
may not work for values > 1000000 us (or 1s).

This patch removes the use of usleep() and uses
std::this_thread::sleep_for() instead, which was introduced with C++11.

Change-Id: I06c55b1be287b264e7601c9c89788ae5929571cf
Reviewed-on: http://gerrit.cloudera.org:8080/4622
Reviewed-by: Sailesh Mukil <sa...@cloudera.com>
Tested-by: Internal Jenkins
---
M be/src/util/time.cc
1 file changed, 4 insertions(+), 3 deletions(-)

Approvals:
  Internal Jenkins: Verified
  Sailesh Mukil: Looks good to me, approved



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

Gerrit-MessageType: merged
Gerrit-Change-Id: I06c55b1be287b264e7601c9c89788ae5929571cf
Gerrit-PatchSet: 3
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Sailesh Mukil <sa...@cloudera.com>
Gerrit-Reviewer: Henry Robinson <he...@cloudera.com>
Gerrit-Reviewer: Internal Jenkins
Gerrit-Reviewer: Sailesh Mukil <sa...@cloudera.com>

[Impala-ASF-CR] IMPALA-4246: SleepForMs() utility function has undefined behavior for > 1s

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

Change subject: IMPALA-4246: SleepForMs() utility function has undefined behavior for > 1s
......................................................................


Patch Set 1: Code-Review+2

(2 comments)

Carry +2.

http://gerrit.cloudera.org:8080/#/c/4622/1/be/src/util/time.cc
File be/src/util/time.cc:

PS1, Line 26: std::
> remove std::
Done


PS1, Line 26: std::
> remove std::
Done


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I06c55b1be287b264e7601c9c89788ae5929571cf
Gerrit-PatchSet: 1
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Sailesh Mukil <sa...@cloudera.com>
Gerrit-Reviewer: Henry Robinson <he...@cloudera.com>
Gerrit-Reviewer: Sailesh Mukil <sa...@cloudera.com>
Gerrit-HasComments: Yes

[Impala-ASF-CR] IMPALA-4246: SleepForMs() utility function has undefined behavior for > 1s

Posted by "Sailesh Mukil (Code Review)" <ge...@cloudera.org>.
Hello Henry Robinson,

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

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

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

Change subject: IMPALA-4246: SleepForMs() utility function has undefined behavior for > 1s
......................................................................

IMPALA-4246: SleepForMs() utility function has undefined behavior for > 1s

Our SleepForMs() function relied on usleep() which sleeps for 'n'
microseconds. However, the manpage for usleep() specifies that this
may not work for values > 1000000 us (or 1s).

This patch removes the use of usleep() and uses
std::this_thread::sleep_for() instead, which was introduced with C++11.

Change-Id: I06c55b1be287b264e7601c9c89788ae5929571cf
---
M be/src/util/time.cc
1 file changed, 4 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/22/4622/2
-- 
To view, visit http://gerrit.cloudera.org:8080/4622
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I06c55b1be287b264e7601c9c89788ae5929571cf
Gerrit-PatchSet: 2
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Sailesh Mukil <sa...@cloudera.com>
Gerrit-Reviewer: Henry Robinson <he...@cloudera.com>
Gerrit-Reviewer: Sailesh Mukil <sa...@cloudera.com>

[Impala-ASF-CR] IMPALA-4246: SleepForMs() utility function has undefined behavior for > 1s

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

Change subject: IMPALA-4246: SleepForMs() utility function has undefined behavior for > 1s
......................................................................


Patch Set 2: Verified+1

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I06c55b1be287b264e7601c9c89788ae5929571cf
Gerrit-PatchSet: 2
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Sailesh Mukil <sa...@cloudera.com>
Gerrit-Reviewer: Henry Robinson <he...@cloudera.com>
Gerrit-Reviewer: Internal Jenkins
Gerrit-Reviewer: Sailesh Mukil <sa...@cloudera.com>
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-4246: SleepForMs() utility function has undefined behavior for > 1s

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

Change subject: IMPALA-4246: SleepForMs() utility function has undefined behavior for > 1s
......................................................................


Patch Set 2: Code-Review+2

Carry +2.

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I06c55b1be287b264e7601c9c89788ae5929571cf
Gerrit-PatchSet: 2
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Sailesh Mukil <sa...@cloudera.com>
Gerrit-Reviewer: Henry Robinson <he...@cloudera.com>
Gerrit-Reviewer: Sailesh Mukil <sa...@cloudera.com>
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-4246: SleepForMs() utility function has undefined behavior for > 1s

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

Change subject: IMPALA-4246: SleepForMs() utility function has undefined behavior for > 1s
......................................................................


Patch Set 1: Code-Review+2

(2 comments)

http://gerrit.cloudera.org:8080/#/c/4622/1/be/src/util/time.cc
File be/src/util/time.cc:

PS1, Line 26: std::
remove std::


PS1, Line 26: std::
remove std::


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I06c55b1be287b264e7601c9c89788ae5929571cf
Gerrit-PatchSet: 1
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Sailesh Mukil <sa...@cloudera.com>
Gerrit-Reviewer: Henry Robinson <he...@cloudera.com>
Gerrit-HasComments: Yes