Skip to content

HDDS-16074. Make Recon RECON_TASK_STATUS column upgrade idempotent and fail on error. - #11060

Draft
ArafatKhan2198 wants to merge 1 commit into
apache:masterfrom
ArafatKhan2198:HDDS-16074
Draft

HDDS-16074. Make Recon RECON_TASK_STATUS column upgrade idempotent and fail on error.#11060
ArafatKhan2198 wants to merge 1 commit into
apache:masterfrom
ArafatKhan2198:HDDS-16074

Conversation

@ArafatKhan2198

Copy link
Copy Markdown
Contributor

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

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant