Impala Public Jenkins has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/9158 )
Change subject: IMPALA-6449: Use CLOCK_MONOTONIC in ConditionVariable ...................................................................... IMPALA-6449: Use CLOCK_MONOTONIC in ConditionVariable ConditionVariable is a thin wrapper around pthread_cond_*. Currently, pthread_cond_timedwait() uses the default attribute CLOCK_REALTIME. This is susceptible to adjustment to the system clock from various sources such as NTP and time may go backward. This change fixes the problem by switching to using CLOCK_MONOTONIC so time will be monotonic although the frequency of the clock ticks may still be adjusted by NTP. Ideally, we should use CLOCK_MONOTONIC_RAW but it's available only on Linux kernel 2.6.28 or latter. This change also get rids of some usage of boost::get_system_time() which suffers from the same problem. Change-Id: I81611cfd5e7c5347203fe7fa6b0f615602257f87 Reviewed-on: http://gerrit.cloudera.org:8080/9158 Reviewed-by: Michael Ho <[email protected]> Tested-by: Impala Public Jenkins --- M be/src/rpc/thrift-server.cc M be/src/runtime/fragment-instance-state.cc M be/src/service/impala-server.cc M be/src/util/blocking-queue.h M be/src/util/condition-variable.h M be/src/util/promise.h M be/src/util/time.h 7 files changed, 44 insertions(+), 36 deletions(-) Approvals: Michael Ho: Looks good to me, approved Impala Public Jenkins: Verified -- To view, visit http://gerrit.cloudera.org:8080/9158 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I81611cfd5e7c5347203fe7fa6b0f615602257f87 Gerrit-Change-Number: 9158 Gerrit-PatchSet: 3 Gerrit-Owner: Michael Ho <[email protected]> Gerrit-Reviewer: Impala Public Jenkins Gerrit-Reviewer: Jim Apple <[email protected]> Gerrit-Reviewer: Michael Ho <[email protected]> Gerrit-Reviewer: Sailesh Mukil <[email protected]>
