David Ribeiro Alves has uploaded this change for review. ( 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 --- M src/kudu/gutil/walltime.h 1 file changed, 11 insertions(+), 2 deletions(-) git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/71/10371/1 -- 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: newchange Gerrit-Change-Id: Ie0eaa548f61352be529755a732566613cfa72098 Gerrit-Change-Number: 10371 Gerrit-PatchSet: 1 Gerrit-Owner: David Ribeiro Alves <[email protected]>
