mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-27 01:51:59 +00:00
Print debug info
This commit is contained in:
parent
7e9e03b9c6
commit
28ae671875
@ -1352,16 +1352,7 @@ def test_shards_distributed(started_cluster, mode, processing_threads):
|
||||
def get_count(node, table_name):
|
||||
return int(run_query(node, f"SELECT count() FROM {table_name}"))
|
||||
|
||||
for _ in range(30):
|
||||
if (
|
||||
get_count(node, dst_table_name) + get_count(node_2, dst_table_name)
|
||||
) == total_rows:
|
||||
break
|
||||
time.sleep(1)
|
||||
|
||||
if (
|
||||
get_count(node, dst_table_name) + get_count(node_2, dst_table_name)
|
||||
) != total_rows:
|
||||
def print_debug_info():
|
||||
processed_files = (
|
||||
node.query(
|
||||
f"""
|
||||
@ -1388,7 +1379,7 @@ select splitByChar('/', file_name)[-1] as file from system.s3queue where zookeep
|
||||
)
|
||||
|
||||
count = get_count(node, dst_table_name) + get_count(node_2, dst_table_name)
|
||||
logging.debug(f"Processed rows: {count}/{files_to_generate}")
|
||||
logging.debug(f"Processed rows: {count}/{total_rows}")
|
||||
|
||||
info = node.query(
|
||||
f"""
|
||||
@ -1425,6 +1416,18 @@ select splitByChar('/', file_name)[-1] as file from system.s3queue where zookeep
|
||||
|
||||
logging.debug(f"Intersecting files: {intersection(files1, files2)}")
|
||||
|
||||
for _ in range(30):
|
||||
if (
|
||||
get_count(node, dst_table_name) + get_count(node_2, dst_table_name)
|
||||
) == total_rows:
|
||||
break
|
||||
time.sleep(1)
|
||||
|
||||
if (
|
||||
get_count(node, dst_table_name) + get_count(node_2, dst_table_name)
|
||||
) != total_rows:
|
||||
print_debug_info()
|
||||
|
||||
assert False
|
||||
|
||||
get_query = f"SELECT column1, column2, column3 FROM {dst_table_name}"
|
||||
@ -1433,6 +1436,10 @@ select splitByChar('/', file_name)[-1] as file from system.s3queue where zookeep
|
||||
list(map(int, l.split())) for l in run_query(node_2, get_query).splitlines()
|
||||
]
|
||||
|
||||
if len(res1) + len(res2) != total_rows or len(res1) <= 0 or len(res2) <= 0 or True:
|
||||
logging.debug(f"res1 size: {len(res1)}, res2 size: {len(res2)}, total_rows: {total_rows}")
|
||||
print_debug_info()
|
||||
|
||||
assert len(res1) + len(res2) == total_rows
|
||||
|
||||
# Checking that all engines have made progress
|
||||
|
Loading…
Reference in New Issue
Block a user