Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/config/muted_ya.txt
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,6 @@ ydb/tests/compatibility test_stress.py.TestStress.test_tpch1[mixed_current_and_s
ydb/tests/compatibility test_stress.py.TestStress.test_tpch1[mixed_current_and_stable-25-3-1-row]
ydb/tests/compatibility test_stress.py.TestStress.test_tpch1[mixed_stable-25-3-1-row]
ydb/tests/compatibility test_stress.py.TestStress.test_tpch1[mixed_stable-25-3-1_and_stable-25-2-1-row]
ydb/tests/compatibility/olap test_rename_table.py.TestRenameTableRollingUpdate.test_rename_table[rolling_stable-25-2-1_to_stable-25-3-1]
ydb/tests/compatibility/s3_backups test_export_import_s3.py.TestExportImportS3.test_topics[mixed_stable-25-3-1_and_stable-25-2-1]
ydb/tests/fq/http_api py3test.sole chunk
ydb/tests/fq/mem_alloc test_scheduling.py.TestSchedule.test_skip_busy[kikimr0]
Expand Down
13 changes: 12 additions & 1 deletion ydb/tests/compatibility/olap/test_rename_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ def predicate():
return True
except ydb.issues.Undetermined:
return False
except ydb.issues.SchemeError as e:
error_msg = str(e).lower()
if "cannot find table" in error_msg or "does not exist" in error_msg:
logger.debug(f"Got temporary SchemeError, will retry: {e}")
return False
raise

return wait_for(predicate, timeout_seconds=timeout_seconds, step_seconds=step_seconds)

Expand Down Expand Up @@ -157,7 +163,12 @@ def run_iteration(self, iteration):
""",
{"$data": (rows, ydb.ListType(data_struct_type))}
))
logger.info(f"Iteration {iteration} about to rename")
logger.info(f"Iteration {iteration} about to rename table_{iteration} to table_{iteration + 1}")
wait_for_undetermined_ok(lambda: session_pool.execute_with_retries(
f"""
select count(*) as cnt from `{self.get_table_name(iteration)}`;
"""
))
session_pool.execute_with_retries(
f"""
ALTER TABLE `{self.get_table_name(iteration)}` RENAME TO `{self.get_table_name(iteration + 1)}`;
Expand Down
Loading