Skip to content

HDDS-15135. Import container to another volume if already exists in selected one#10161

Open
devmadhuu wants to merge 2 commits intoapache:masterfrom
devmadhuu:HDDS-15135
Open

HDDS-15135. Import container to another volume if already exists in selected one#10161
devmadhuu wants to merge 2 commits intoapache:masterfrom
devmadhuu:HDDS-15135

Conversation

@devmadhuu
Copy link
Copy Markdown
Contributor

This change prevents DN replication/import from failing the whole target DN when the volume selected by the volume choosing policy already contains a stale container directory.

Key changes:

  • Retry container creation on another candidate volume when KeyValueContainer#create hits an existing container directory on the selected volume.
  • Add retry-aware import path in ContainerImporter for pull and push replication.
  • Keep retry scoped to CONTAINER_ALREADY_EXISTS; other import failures still fail normally.
  • Handling committed space reservation accounting for both initial and retry-selected volumes.
  • Add unit coverage for stale selected-volume container dirs in create/import paths.

What is the link to the Apache JIRA

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

How was this patch tested?

This patch was tested using some new unit tests and some existing ones:

Tests:

  • Added unit coverage for retrying another candidate volume when the selected volume already has the target container directory.
  • Added unit coverage for retry-aware container import when the initially selected volume has a stale container directory.

… when selected target volume already has same container directory.
@devmadhuu devmadhuu changed the title HDDS-15135. DN replication/reconstruction should retry another volume… HDDS-15135. DN replication/reconstruction should retry another volume when selected target volume already has same container directory. Apr 30, 2026
@adoroszlai adoroszlai changed the title HDDS-15135. DN replication/reconstruction should retry another volume when selected target volume already has same container directory. HDDS-15135. Import container to another volume if already exists in selected one Apr 30, 2026
@devmadhuu devmadhuu marked this pull request as ready for review April 30, 2026 09:14
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.

1 participant