This is an automated email from the ASF dual-hosted git repository. asherman pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/impala.git
commit 66ab46f646909fb6e8b944f454b203cace07a634 Author: Zoltan Borok-Nagy <[email protected]> AuthorDate: Tue Feb 13 14:21:29 2024 +0100 IMPALA-12808: test_iceberg_deletes_and_updates failed by timeout error On some systems test_iceberg_deletes_and_updates fails because the delete thread cannot succeed as it always gets validation errors due to the concurrent UPDATEs. This patch adds SYNC_DDL=true to the DELETE/UPDATE threads, and also prints out the exceptions which can be useful to debug test failures in the future. Testing: * validated the fix in an environment where the test failed before Change-Id: Icb0b078df2d95f3a62b124b6148f2f32aa425be4 Reviewed-on: http://gerrit.cloudera.org:8080/21033 Reviewed-by: Impala Public Jenkins <[email protected]> Tested-by: Impala Public Jenkins <[email protected]> --- tests/stress/test_update_stress.py | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/tests/stress/test_update_stress.py b/tests/stress/test_update_stress.py index dec84ddfc..9cc767746 100644 --- a/tests/stress/test_update_stress.py +++ b/tests/stress/test_update_stress.py @@ -168,17 +168,17 @@ class TestIcebergConcurrentDeletesAndUpdates(ImpalaTestSuite): """Deletes every row from the table one by one.""" target_impalad = random.randint(0, ImpalaTestSuite.get_impalad_cluster_size() - 1) impalad_client = ImpalaTestSuite.create_client_for_nth_impalad(target_impalad) + impalad_client.set_configuration_option("SYNC_DDL", "true") i = 0 while i < num_rows: try: impalad_client.execute( "delete from {0} WHERE id = {1}".format(tbl_name, i)) i += 1 - # Sleep after a succesful operation. - time.sleep(random.random()) - except Exception: + except Exception as e: # Exceptions are expected due to concurrent operations. - pass + print(str(e)) + time.sleep(random.random()) flag.value = 1 impalad_client.close() @@ -186,15 +186,15 @@ class TestIcebergConcurrentDeletesAndUpdates(ImpalaTestSuite): """Updates every row in the table in a loop.""" target_impalad = random.randint(0, ImpalaTestSuite.get_impalad_cluster_size() - 1) impalad_client = ImpalaTestSuite.create_client_for_nth_impalad(target_impalad) + impalad_client.set_configuration_option("SYNC_DDL", "true") while flag.value != 1: try: impalad_client.execute( "update {0} set j = j + 1".format(tbl_name)) - # Sleep after a succesful operation. - time.sleep(random.random()) - except Exception: + except Exception as e: # Exceptions are expected due to concurrent operations. - pass + print(str(e)) + time.sleep(random.random()) impalad_client.close() def _impala_role_concurrent_checker(self, tbl_name, flag, num_rows): @@ -232,7 +232,7 @@ class TestIcebergConcurrentDeletesAndUpdates(ImpalaTestSuite): stored as iceberg tblproperties('format-version'='2')""".format(tbl_name,)) - num_rows = 20 + num_rows = 10 values_str = "" for i in range(num_rows): values_str += "({}, 0)".format(i) @@ -246,6 +246,5 @@ class TestIcebergConcurrentDeletesAndUpdates(ImpalaTestSuite): checker = Task(self._impala_role_concurrent_checker, tbl_name, flag, num_rows) run_tasks([deleter, updater, checker]) - self.client.execute("refresh {}".format(tbl_name)) result = self.client.execute("select count(*) from {}".format(tbl_name)) assert result.data == ['0']
