compact: also fix segments hints data for lost segment files

The code used to remove the missing segment only from "compact" hints,
but we need to also remove it from "segments" hints.
This commit is contained in:
Thomas Waldmann 2025-12-02 01:37:35 +01:00
parent b1bb3830fb
commit d676ef7b3f
No known key found for this signature in database
GPG key ID: 243ACFA951F78E01

View file

@ -753,7 +753,8 @@ class LegacyRepository:
for segment, freeable_space in sorted(self.compact.items()):
if not self.io.segment_exists(segment):
logger.warning("Segment %d not found, but listed in compaction data", segment)
del self.compact[segment]
self.compact.pop(segment, None)
self.segments.pop(segment, None)
pi.show()
self._send_log()
continue