Repository: impala
Updated Branches:
  refs/heads/master 5bdce5a86 -> 54f70b6d6


IMPALA-4631: loosen monotonic clock DCHECK

We saw another build failure due to hitting one of these DCHECKs.
Let's further loosen the check to avoid the failures on misbehaving
systems.

Change-Id: I72d314518087aede16e8d702c2f904b679a55f6d
Reviewed-on: http://gerrit.cloudera.org:8080/10026
Tested-by: Impala Public Jenkins <impala-public-jenk...@cloudera.com>
Reviewed-by: Tim Armstrong <tarmstr...@cloudera.com>


Project: http://git-wip-us.apache.org/repos/asf/impala/repo
Commit: http://git-wip-us.apache.org/repos/asf/impala/commit/54f70b6d
Tree: http://git-wip-us.apache.org/repos/asf/impala/tree/54f70b6d
Diff: http://git-wip-us.apache.org/repos/asf/impala/diff/54f70b6d

Branch: refs/heads/master
Commit: 54f70b6d6960ad53355b43f704a82f1f3a457d4d
Parents: 5bdce5a
Author: Tim Armstrong <tarmstr...@cloudera.com>
Authored: Wed Apr 11 15:43:51 2018 -0700
Committer: Tim Armstrong <tarmstr...@cloudera.com>
Committed: Thu Apr 12 05:29:03 2018 +0000

----------------------------------------------------------------------
 be/src/runtime/fragment-instance-state.cc | 7 ++++---
 be/src/util/runtime-profile-counters.h    | 6 +++---
 2 files changed, 7 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/impala/blob/54f70b6d/be/src/runtime/fragment-instance-state.cc
----------------------------------------------------------------------
diff --git a/be/src/runtime/fragment-instance-state.cc 
b/be/src/runtime/fragment-instance-state.cc
index acbce84..7322519 100644
--- a/be/src/runtime/fragment-instance-state.cc
+++ b/be/src/runtime/fragment-instance-state.cc
@@ -320,9 +320,10 @@ void FragmentInstanceState::Close() {
       RuntimeProfile::Counter* counter = timings_profile_->GetCounter(name);
       if (counter != nullptr) other_time += counter->value();
     }
-    // TODO: IMPALA-4631: Occasionally we see other_time = total_time + 1 for 
some reason
-    // we don't yet understand, so add 1 to total_time to avoid DCHECKing in 
that case.
-    DCHECK_LE(other_time, total_time + 1);
+    // TODO: IMPALA-4631: Occasionally we see other_time = total_time + ε 
where ε is 1,
+    // 2, or 3. It appears to be a bug with clocks on some virtualized 
systems. Add 3
+    // to total_time to avoid DCHECKing in that case.
+    DCHECK_LE(other_time, total_time + 3);
   }
 #endif
 }

http://git-wip-us.apache.org/repos/asf/impala/blob/54f70b6d/be/src/util/runtime-profile-counters.h
----------------------------------------------------------------------
diff --git a/be/src/util/runtime-profile-counters.h 
b/be/src/util/runtime-profile-counters.h
index 52410b5..de29318 100644
--- a/be/src/util/runtime-profile-counters.h
+++ b/be/src/util/runtime-profile-counters.h
@@ -303,9 +303,9 @@ class RuntimeProfile::EventSequence {
   void Start(int64_t start_time_ns) {
     offset_ = MonotonicStopWatch::Now() - start_time_ns;
     // TODO: IMPALA-4631: Occasionally we see MonotonicStopWatch::Now() return
-    // (start_time_ns - 1), even though 'start_time_ns' was obtained using
-    // MonotonicStopWatch::Now().
-    DCHECK_GE(offset_, -1);
+    // (start_time_ns - e), where e is 1, 2 or 3 even though 'start_time_ns' 
was
+    // obtained using MonotonicStopWatch::Now().
+    DCHECK_GE(offset_, -3);
     sw_.Start();
   }
 

Reply via email to