David Ribeiro Alves has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/10371 )
Change subject: Fix int overflow GetClockTimeMicros() on macOS ...................................................................... Fix int overflow GetClockTimeMicros() on macOS On macOS mach_timespec_t.tv_sec is only 4 bytes and we were converting to micros before moving to a bigger var. This would cause all the wall times obtained on a mac (through GetClockTimeMicros() to be wrong. This was likely the cause of KUDU-2435 and KUDU-2408 too, since the time would easily wrap, causing us to a update the clock with a value that was seemingly from the future. Posix just requires it to be an integer (see: https://en.wikipedia.org/w/index.php?title=Time_t&oldid=450752800) so also fixed it on the non-macOS path. Testing this is likely not worth it since the only real change was on macOS where the overlow doesn't happen anymore. Change-Id: Ie0eaa548f61352be529755a732566613cfa72098 Reviewed-on: http://gerrit.cloudera.org:8080/10371 Reviewed-by: Todd Lipcon <[email protected]> Reviewed-by: Dan Burkert <[email protected]> Reviewed-by: Grant Henke <[email protected]> Tested-by: Kudu Jenkins --- M src/kudu/gutil/walltime.h 1 file changed, 13 insertions(+), 2 deletions(-) Approvals: Todd Lipcon: Looks good to me, but someone else must approve Dan Burkert: Looks good to me, approved Grant Henke: Looks good to me, approved Kudu Jenkins: Verified -- To view, visit http://gerrit.cloudera.org:8080/10371 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ie0eaa548f61352be529755a732566613cfa72098 Gerrit-Change-Number: 10371 Gerrit-PatchSet: 3 Gerrit-Owner: David Ribeiro Alves <[email protected]> Gerrit-Reviewer: Dan Burkert <[email protected]> Gerrit-Reviewer: David Ribeiro Alves <[email protected]> Gerrit-Reviewer: Grant Henke <[email protected]> Gerrit-Reviewer: Kudu Jenkins Gerrit-Reviewer: Todd Lipcon <[email protected]>
