Skip to content

HDDS-16880. Addendum: Clear Recon candidate dir after a failed OM DB download - #11624

Merged
smengcl merged 1 commit into
apache:masterfrom
smengcl:HDDS-16880-addendum
Oct 22, 2026
Merged

smengcl merged 1 commit into
apache:masterfrom
smengcl:HDDS-16880-addendum

Conversation

@smengcl

@smengcl smengcl commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

Generated-by: Claude Code (Opus 5.5)

What changes were proposed in this pull request?

Addendum to #11563, following the review discussion there.

#11563 kept Recon's candidate dir after a failed OM DB download and guarded it with a Recon only untarContentsOfTarball override that extracts through .tmp files, so the retry could skip files already received. The OM follower does not do this: OzoneManager#installSnapshotFromLeader deletes the candidate dir after a failed download. Recon gets the active DB as one tarball, so the exclude list only has entries on a retry after a failure, and that saves little (only files before the cut, which compaction may make stale, and a full disk stays full).

This patch aligns Recon with the OM follower:

  • Clear the candidate dir in the failure path of OzoneManagerServiceProviderImpl#getOzoneManagerDBSnapshot via RDBSnapshotProvider#init, which also resets the pinned leader.
  • Remove the untarContentsOfTarball override from ReconRDBSnapshotProvider and make the base method private again.

What is the link to the Apache JIRA

https://issues.apache.org/jira/browse/HDDS-16880

How was this patch tested?

testPartiallyUntarredFileNotReportedOnRetry is renamed to testCandidateDirClearedAfterFailedDownload and now checks that, after a download whose tar ends in the middle of an SST file, the candidate dir is empty and the retry sends an empty exclude list.

TestOzoneManagerServiceProviderImpl, TestReconRDBSnapshotProvider, TestTriggerDBSyncEndpoint and TestRDBSnapshotProvider pass (24 tests). Checkstyle is clean.

🤖 Generated with Claude Code

…download

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings October 19, 2026 08:21

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@sadanand48 sadanand48 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM based on the discussions in #11563

@smengcl
smengcl marked this pull request as ready for review October 22, 2026 10:52
@smengcl

smengcl commented Oct 22, 2026

Copy link
Copy Markdown
Contributor Author

Thanks @sadanand48 for the review.

@smengcl
smengcl merged commit e77a4fd into apache:master Oct 22, 2026
73 checks passed
@smengcl
smengcl deleted the HDDS-16880-addendum branch October 22, 2026 17:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants