Repository navigation
HDDS-17040. Recon delta task that throws is not retried and triggers no reinitialization, so its batch is silently skipped. - #11934
Draft
ArafatKhan2198 wants to merge 1 commit into
Draft
ArafatKhan2198 wants to merge 1 commit into
ArafatKhan2198 wants to merge 1 commit into
Conversation
…no reinitialization, so its batch is silently skipped Co-Authored-By: Claude <noreply@anthropic.com>
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?
When a Recon task returns a failure, Recon retries the batch and reinitializes the tasks if the retry fails too. But when a task throws an exception, Recon only logs it and moves on, so that batch is lost for that task.
Which errors end up as a throw, per task:
Example:
ContainerKeyMapperTaskhits aNullPointerException, which isn't anIOException, so it throws.Fix: in the
exceptionallybranch ofprocessTasks, add the task tofailedTasks, so a thrown exception is handled like a returned failure (retry, then reinitialize).failedTasksandretryFailedTasksalso become synchronized lists, since several threads add to them at the same time.Retrying is safe because the affected tasks save each batch in one atomic write: if the task threw, nothing from that batch was saved. This is a safety net for unexpected errors such as bugs; normal operation doesn't trigger it.
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-17040
How was this patch tested?
testTaskRecordsFailureOnException: a task that always throws is retried, then requests reinitialization.testTaskThrowingOnceIsRetried: a task that throws once is retried and succeeds.