mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 15:42:02 +00:00
Remove checks for profile events because they are not updated the same way with async reads
This commit is contained in:
parent
6f895036e6
commit
7c2315638c
@ -60,15 +60,13 @@ def test_write_is_cached(cluster, min_rows_for_wide_part, read_requests):
|
||||
select_query = "SELECT * FROM s3_test order by id FORMAT Values"
|
||||
assert node.query(select_query) == "(0,'data'),(1,'data')"
|
||||
|
||||
stat = get_query_stat(node, select_query)
|
||||
assert stat["S3ReadRequestsCount"] == read_requests # Only .bin files should be accessed from S3.
|
||||
# With async reads profile events are not updated because reads are done in a separate thread.
|
||||
# stat = get_query_stat(node, select_query)
|
||||
# assert stat["S3ReadRequestsCount"] == read_requests # Only .bin files should be accessed from S3.
|
||||
|
||||
node.query("DROP TABLE IF EXISTS s3_test NO DELAY")
|
||||
|
||||
# with non-async reads:
|
||||
#@pytest.mark.parametrize("min_rows_for_wide_part,all_files,bin_files", [(0, 4, 2), (8192, 2, 1)])
|
||||
# with async reads:
|
||||
@pytest.mark.parametrize("min_rows_for_wide_part,all_files,bin_files", [(0, 2, 2), (8192, 2, 1)])
|
||||
@pytest.mark.parametrize("min_rows_for_wide_part,all_files,bin_files", [(0, 4, 2), (8192, 2, 1)])
|
||||
def test_read_after_cache_is_wiped(cluster, min_rows_for_wide_part, all_files, bin_files):
|
||||
node = cluster.instances["node"]
|
||||
|
||||
@ -93,13 +91,16 @@ def test_read_after_cache_is_wiped(cluster, min_rows_for_wide_part, all_files, b
|
||||
|
||||
select_query = "SELECT * FROM s3_test"
|
||||
node.query(select_query)
|
||||
stat = get_query_stat(node, select_query)
|
||||
assert stat["S3ReadRequestsCount"] == all_files # .mrk and .bin files should be accessed from S3.
|
||||
# With async reads profile events are not updated because reads are done in a separate thread.
|
||||
# stat = get_query_stat(node, select_query)
|
||||
# assert stat["S3ReadRequestsCount"] == all_files # .mrk and .bin files should be accessed from S3.
|
||||
|
||||
# After cache is populated again, only .bin files should be accessed from S3.
|
||||
select_query = "SELECT * FROM s3_test order by id FORMAT Values"
|
||||
assert node.query(select_query) == "(0,'data'),(1,'data')"
|
||||
stat = get_query_stat(node, select_query)
|
||||
assert stat["S3ReadRequestsCount"] == bin_files
|
||||
|
||||
# With async reads profile events are not updated because reads are done in a separate thread.
|
||||
#stat = get_query_stat(node, select_query)
|
||||
#assert stat["S3ReadRequestsCount"] == bin_files
|
||||
|
||||
node.query("DROP TABLE IF EXISTS s3_test NO DELAY")
|
||||
|
@ -159,7 +159,7 @@ def test_profile_events(cluster):
|
||||
assert metrics3["S3WriteRequestsCount"] - metrics2["S3WriteRequestsCount"] == minio3["set_requests"] - minio2[
|
||||
"set_requests"]
|
||||
stat3 = get_query_stat(instance, query3)
|
||||
# Last assert does not work properly with remote_filesystem_read_method=threadpool
|
||||
# With async reads profile events are not updated fully because reads are done in a separate thread.
|
||||
#for metric in stat3:
|
||||
# print(metric)
|
||||
# assert stat3[metric] == metrics3[metric] - metrics2[metric]
|
||||
|
Loading…
Reference in New Issue
Block a user