diff --git a/tests/rptest/remote_scripts/compute_storage.py b/tests/rptest/remote_scripts/compute_storage.py index fea5c0329b76e..34e957db95999 100644 --- a/tests/rptest/remote_scripts/compute_storage.py +++ b/tests/rptest/remote_scripts/compute_storage.py @@ -119,6 +119,7 @@ def compute_size_for_file(file: Path, calc_md5: bool): def compute_size(data_dir: Path, sizes: bool, calculate_md5: bool, print_flat: bool): output = {} + segment_parse_error = {} for ns in safe_listdir(data_dir): if not safe_isdir(ns): continue @@ -144,6 +145,14 @@ def compute_size(data_dir: Path, sizes: bool, calculate_md5: bool, # It's valid to have a segment deleted # at anytime continue + except AssertionError as e: + if print_flat: + raise e + return { + "parse_failed": True, + "segment": segment, + "error": str(e) + } part_output[segment.name] = seg_output topic_output[partition.name] = part_output ns_output[topic.name] = topic_output