From: Jakob Cornell Date: Fri, 22 Apr 2022 06:18:26 +0000 (-0500) Subject: Verify: remove memory hog audit X-Git-Url: https://jcornell.net/gitweb/gitweb.cgi?a=commitdiff_plain;h=68e391940a7bafba664b76f295fb90dcfaf2270f;p=eros.git Verify: remove memory hog audit --- diff --git a/disk_jumble/src/disk_jumble/verify.py b/disk_jumble/src/disk_jumble/verify.py index 4cd7939..db1bcdc 100644 --- a/disk_jumble/src/disk_jumble/verify.py +++ b/disk_jumble/src/disk_jumble/verify.py @@ -1,7 +1,6 @@ from __future__ import annotations from dataclasses import dataclass from typing import Iterator, List, Optional -from warnings import warn import argparse import contextlib import hashlib @@ -277,11 +276,6 @@ def _get_v2_worklist(conn, disk_id: int, target_ranges: List[NumericRange]) -> I def _do_verify(conn, disk_id: int, target_ranges: List[range], disk_file: io.BufferedIOBase, read_size: int, read_tries: int): - requested_blocks = { - block - for r in target_ranges - for block in r - } pg_target_ranges = [NumericRange(r.start, r.stop) for r in target_ranges] # transaction is required for named cursors in worklist generation @@ -292,7 +286,6 @@ def _do_verify(conn, disk_id: int, target_ranges: List[range], disk_file: io.Buf key = _run_sort_key, ) - covered_blocks = set() passes = [] fails = [] for run in worklist: @@ -333,16 +326,6 @@ def _do_verify(conn, disk_id: int, target_ranges: List[range], disk_file: io.Buf else: fails.extend(run.block_ranges) - covered_blocks.update( - block - for block_range in run.block_ranges - for block in block_range - ) - - missing = requested_blocks - covered_blocks - if missing: - warn(f"unable to locate blocks: {len(missing)} in the range {min(missing)} to {max(missing)}") - def clean_up(ranges): out = [] for r in sorted(ranges, key = lambda r: r.start):