You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@impala.apache.org by wz...@apache.org on 2022/04/14 23:19:02 UTC
[impala] branch master updated: IMPALA-11246: TestAcid.test_lock_timings is flaky
This is an automated email from the ASF dual-hosted git repository.
wzhou pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/impala.git
The following commit(s) were added to refs/heads/master by this push:
new 31bd2a470 IMPALA-11246: TestAcid.test_lock_timings is flaky
31bd2a470 is described below
commit 31bd2a47036e7be3a0a32f873b60d2f70dcd8c9f
Author: Zoltan Borok-Nagy <bo...@cloudera.com>
AuthorDate: Thu Apr 14 17:54:40 2022 +0200
IMPALA-11246: TestAcid.test_lock_timings is flaky
Added a few extra seconds to the test_lock_timings test to
make it more stable.
Also added an extra log message about the time being spent
on waiting for the lock.
Change-Id: I4c9cc52f799261bbf610e7510e7bf1b61ca6c60a
Reviewed-on: http://gerrit.cloudera.org:8080/18419
Reviewed-by: Impala Public Jenkins <im...@cloudera.com>
Tested-by: Impala Public Jenkins <im...@cloudera.com>
---
.../org/apache/impala/catalog/Hive3MetastoreShimBase.java | 6 +++++-
tests/query_test/test_acid.py | 12 ++++++------
2 files changed, 11 insertions(+), 7 deletions(-)
diff --git a/fe/src/main/java/org/apache/impala/catalog/Hive3MetastoreShimBase.java b/fe/src/main/java/org/apache/impala/catalog/Hive3MetastoreShimBase.java
index f49639ef3..2cb12c88c 100644
--- a/fe/src/main/java/org/apache/impala/catalog/Hive3MetastoreShimBase.java
+++ b/fe/src/main/java/org/apache/impala/catalog/Hive3MetastoreShimBase.java
@@ -660,7 +660,11 @@ public class Hive3MetastoreShimBase {
// acquireLock() interruptible so we just swallow the exception here.
}
}
- if (lockResponse.getState() == LockState.ACQUIRED) {
+ LockState lockState = lockResponse.getState();
+ LOG.info("It took " + String.valueOf(System.currentTimeMillis() - startTime) +
+ " ms to wait for lock " + String.valueOf(lockId) + " of transaction " +
+ String.valueOf(txnId) + ". Final lock state is " + lockState.name());
+ if (lockState == LockState.ACQUIRED) {
return lockId;
}
if (lockId > 0) {
diff --git a/tests/query_test/test_acid.py b/tests/query_test/test_acid.py
index 8c5180226..fbe89438a 100644
--- a/tests/query_test/test_acid.py
+++ b/tests/query_test/test_acid.py
@@ -327,26 +327,26 @@ class TestAcid(ImpalaTestSuite):
try:
if self.exploration_strategy() == 'exhaustive':
elapsed = elapsed_time_for_query("insert into {} values (1)".format(tbl))
- assert elapsed > 300 and elapsed < 305
+ assert elapsed > 300 and elapsed < 310
self.execute_query("set lock_max_wait_time_s=20")
elapsed = elapsed_time_for_query("insert into {} values (1)".format(tbl))
- assert elapsed > 20 and elapsed < 25
+ assert elapsed > 20 and elapsed < 28
self.execute_query("set lock_max_wait_time_s=0")
elapsed = elapsed_time_for_query("insert into {} values (1)".format(tbl))
- assert elapsed < 5
+ assert elapsed < 8
self.execute_query("set lock_max_wait_time_s=10")
elapsed = elapsed_time_for_query("insert into {} values (1)".format(tbl))
- assert elapsed > 10 and elapsed < 15
+ assert elapsed > 10 and elapsed < 18
self.execute_query("set lock_max_wait_time_s=2")
elapsed = elapsed_time_for_query("truncate table {}".format(tbl))
- assert elapsed > 2 and elapsed < 7
+ assert elapsed > 2 and elapsed < 10
self.execute_query("set lock_max_wait_time_s=5")
elapsed = elapsed_time_for_query("drop table {}".format(tbl))
- assert elapsed > 5 and elapsed < 10
+ assert elapsed > 5 and elapsed < 13
finally:
acid_util.unlock(lock_resp.lockid)