[Archive] Skip non-VALID catalog entries in ArchiveTool dump - #2122
Open
d9zbglobal wants to merge 2 commits into
Open
[Archive] Skip non-VALID catalog entries in ArchiveTool dump#2122d9zbglobal wants to merge 2 commits into
d9zbglobal wants to merge 2 commits into
Conversation
d9zbglobal
force-pushed
the
archive-tool-dump-skip-non-valid
branch
from
August 19, 2026 15:27
7228d82 to
dbbf223
Compare
…ED/INVALID tombstones no longer abort the run. Issue aeron-io#2100. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
d9zbglobal
force-pushed
the
archive-tool-dump-skip-non-valid
branch
from
August 19, 2026 15:56
dbbf223 to
49c417e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #2100.
ArchiveTool dumphanded every catalog entry to aRecordingReader, so the firstDELETED/INVALIDtombstone (whose segment files are gone) threwIllegalArgumentException: length must be positiveand aborted the whole run — valid recordings later in the catalog were never reached. Archives that purge recordings (e.g. snapshot rotation viaAeronArchive.purgeRecording) accumulate such tombstones until an offlinecompact, makingdumpeffectively unusable on them.This applies the same
state() == VALIDguard thatdescribeuses todump'scatalog.forEach, so non-valid entries are skipped and the remaining recordings are dumped.Includes a test (
ArchiveToolTests.dumpShouldSkipRecordingsInNonValidStates) covering both aDELETEDand anINVALIDentry; it fails with the reported exception without the fix.(@bantek899 — saw your comment on the issue offering to pick this up, apologies for the overlap: we hit this in production tooling and had the change ready. Hope you don't mind.)
Note
Low Risk
Small, read-only change to offline archive inspection tooling; behavior aligns with existing
describefiltering and is covered by a focused unit test.Overview
ArchiveTool dumpno longer tries to read segment data for every catalog row. Itscatalog.forEachcallback now matchesdescribe: it only invokes the per-recording dump whenheaderDecoder.state() == VALID, so tombstonedDELETED/INVALIDentries (often missing segment files) are ignored instead of aborting the whole command.A new test marks a previously valid recording
DELETED, runsdump, and asserts output includes a laterVALIDrecording while omitting the deleted one and catalogINVALIDentries.Reviewed by Cursor Bugbot for commit 49c417e. Bugbot is set up for automated code reviews on this repo. Configure here.