From cabdc7fc3811592aa9a0d8c9ccf8ab3379ad9c03 Mon Sep 17 00:00:00 2001 From: Nicolae Vartolomei Date: Thu, 26 Sep 2024 13:57:44 +0100 Subject: [PATCH] rptest: do not expect cached segment readers at the end of the test This assertion fails from time to time. It seems perfectly fine there not to be any cached readers available. If there aren't any running queries using readers and we are under memory pressure the next query will likely evict all segment readers to free up resources. Reader eviction (and memory accounting) is asynchronous but the metric/probe update is synchronous. If we get metrics in-between last query acquiring memory resources (or slightly after) and before the actual physical eviction happened then we expect the metric to be 0. It is possible for the last query to be aborted altogether in-between requesting resources and actually creating a reader which would also lead to metric being 0. I consider this acceptable behavior so removing the assert. (cherry picked from commit 2c7cb0ab5f310a2ffcf95af83d7fcd905fbafbf8) --- tests/rptest/scale_tests/tiered_storage_reader_stress_test.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/tests/rptest/scale_tests/tiered_storage_reader_stress_test.py b/tests/rptest/scale_tests/tiered_storage_reader_stress_test.py index a5732b23b1185..18243be10f184 100644 --- a/tests/rptest/scale_tests/tiered_storage_reader_stress_test.py +++ b/tests/rptest/scale_tests/tiered_storage_reader_stress_test.py @@ -297,9 +297,6 @@ def stats_watcher(): # The stats indicate saturation with tiered storage reads. assert stats['partition_readers_delayed'] or stats[ 'segment_readers_delayed'] - # There are still some segment readers cached as expected, they shouldn't - # all have been trimmed. - assert stats['segment_readers'] def is_metric_zero(fn, label): for node, stats in self._get_stats().items():