Skip to content

HDDS-16805. Verify peer chunk checksums during container reconciliation - #11903

Open
andyhuangdev wants to merge 3 commits into
apache:masterfrom
andyhuangdev:HDDS-16805
Open

andyhuangdev wants to merge 3 commits into
apache:masterfrom
andyhuangdev:HDDS-16805

Conversation

@andyhuangdev

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

Container reconciliation now always verifies checksums when reading chunks from a peer, regardless of the datanode’s ozone.client.verify.checksum setting.

Previously, disabling this setting allowed reconciliation to copy corrupt peer data and mark it healthy in the local Merkle tree. A subsequent healthy peer could not repair that chunk during the same task, and the final scan could mark the replica UNHEALTHY.

The change enables checksum verification on the configuration passed to the reconciliation stream, following the existing EC reconstruction approach. Corrupt chunks are rejected before being written, allowing reconciliation to repair the replica from another peer.

What is the link to the Apache JIRA

HDDS-16805

How was this patch tested?

Added a regression test with client checksum verification disabled, a corrupt peer with stale scan results, and a healthy peer. The test failed before the fix and now verifies that reconciliation restores healthy data and leaves the replica CLOSED.

All 18 tests in TestContainerReconciliationWithMockDatanodes pass. Repository checkstyle and git diff --check also pass.

Always enable checksum verification when reading peer data for reconciliation. Add a regression test covering a corrupt peer followed by a healthy peer with client checksum verification disabled.

Validation: all 18 TestContainerReconciliationWithMockDatanodes tests pass; repository checkstyle and git diff --check pass.
@andyhuangdev
andyhuangdev marked this pull request as ready for review November 2, 2026 08:12

@adoroszlai adoroszlai 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.

Thanks @andyhuangdev for the patch, LGTM.

@smengcl smengcl 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. Thanks @andyhuangdev

@adoroszlai

Copy link
Copy Markdown
Contributor

Workflows are not currently being run on this fork due to the scale of GitHub Actions usage. A repository maintainer can choose to re-enable these.

@andyhuangdev please re-enable workflows in your fork

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants