Repository navigation
Conversation
Co-authored-by: OpenAI Codex (GPT-6 Sol High)
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.
What changes were proposed in this pull request?
During Datanode restart and re-registration, SCM may wait for an
ALLOCATEDpipeline that is removed before becomingOPEN. If no replacement container is available, block allocation fails.Previously,
WritableRatisContainerProviderwrapped this specific failure in a genericIOException. OM consequently returnedINTERNAL_ERROR, which was not retried by the Ozone client, causing intermittent key creation failures.This patch adds a narrowly scoped client-side retry for this transient allocation failure:
SCMException.ResultCodes.PIPELINE_NOT_FOUNDafter the provider's final container lookup.KEY_ALLOCATION_PIPELINE_NOT_FOUND.CreateKey,CreateFile, andAllocateBlock, while preserving SCM safe-mode retries.INTERNAL_ERRORorKEY_ALLOCATION_ERRORresponses.INTERNAL_ERRORto older clients that do not recognize the new status.The
CreateKeyregression test also verifies that this failure occurs during pre-execution, before OM Ratis submission, without creating successful open-key state.The retry reuses the existing limit of 90 retries after the initial attempt (up to 91 submissions), with a one-second delay between attempts.
What is the link to the Apache JIRA?
https://issues.apache.org/jira/browse/HDDS-16712
How was this patch tested?
The following checks passed in local JDK 21 runs:
TestRpcClient,TestOMFileCreateRequest, andTestOMFileCreateRequestWithFSO.git diff --checkpassed.Live Kubernetes Datanode restart and rolling-upgrade tests have not been performed.
Generated-by: OpenAI Codex (GPT-6 Sol High)