HDDS-16074. Make Recon RECON_TASK_STATUS column upgrade idempotent and fail on error. - #11060
Draft
ArafatKhan2198 wants to merge 1 commit into
Draft
HDDS-16074. Make Recon RECON_TASK_STATUS column upgrade idempotent and fail on error.#11060ArafatKhan2198 wants to merge 1 commit into
ArafatKhan2198 wants to merge 1 commit into
Conversation
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?
The upgrade action that adds the last_task_run_status and is_current_task_running columns to the RECON_TASK_STATUS table (ReconTaskStatusTableUpgradeAction) has two robustness gaps:
It swallows failures. Unlike the other upgrade actions, execute() catches and logs any error but does not rethrow. If the column migration fails, layout finalization still marks the version as complete — leaving a table without the required columns that appears upgraded. Subsequent writes to RECON_TASK_STATUS then fail.
It is not idempotent and cannot complete a partial migration. It unconditionally adds the columns and resets every row to 0, so it cannot safely re-run on a table that already has the columns, and cannot recover a migration that was interrupted after adding a column but before enforcing NOT NULL.
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-16074
How was this patch tested?
Unit testing