[ 
https://issues.apache.org/jira/browse/HDDS-11465?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Arafat Khan updated HDDS-11465:
-------------------------------
    Description: 
Currently, Recon does not have a schema versioning mechanism in place for 
handling database schema evolution. As a result, when new schema changes are 
introduced (e.g., adding new enum states like {{{}MISSING{}}}, 
{{NEGATIVE_SIZE}} in the {{{}UnHealthyContainerStates{}}}) for the 
{*}{{UnHealthyContainerTable}}{*}, it becomes challenging to distinguish 
between fresh installations and upgrades, leading to issues where old schema 
versions may still be used despite an upgrade.

This ticket proposes introducing a *schema versioning system* to manage 
database schema changes in a more controlled manner

  was:
With Recon’s new schema versioning framework now integrated, it is essential to 
address initial schema constraints for existing tables. Previously, Recon 
lacked schema versioning, which meant there were no upgrade actions or 
mechanisms to adjust schema tables post-upgrade. This led to inconsistencies, 
especially when new enum states (like {{MISSING}} and {{NEGATIVE_SIZE}} in 
{{{}UnHealthyContainerStates{}}}) were introduced, as older schema versions 
might still persist despite upgrades.

This ticket introduces a foundational upgrade action, 
{{{}InitialConstraintUpgradeAction{}}}, associated with the *INITIAL_VERSION* 
feature to handle any missed schema updates within the {{UNHEALTHY_CONTAINERS}} 
table. This upgrade action retroactively applies constraints and ensures all 
existing tables are correctly versioned. Moving forward, any updates or new 
metadata table introductions in Recon will be tracked and managed by version 
using the {{ReconLayoutFeature}} framework, enabling a seamless and structured 
upgrade process for future schema changes


> Introducing Schema Versioning for Recon to Handle Fresh Installs and Upgrades
> -----------------------------------------------------------------------------
>
>                 Key: HDDS-11465
>                 URL: https://issues.apache.org/jira/browse/HDDS-11465
>             Project: Apache Ozone
>          Issue Type: Improvement
>          Components: Ozone Recon
>    Affects Versions: 1.4.0
>            Reporter: Arafat Khan
>            Assignee: Arafat Khan
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 2.0.0
>
>
> Currently, Recon does not have a schema versioning mechanism in place for 
> handling database schema evolution. As a result, when new schema changes are 
> introduced (e.g., adding new enum states like {{{}MISSING{}}}, 
> {{NEGATIVE_SIZE}} in the {{{}UnHealthyContainerStates{}}}) for the 
> {*}{{UnHealthyContainerTable}}{*}, it becomes challenging to distinguish 
> between fresh installations and upgrades, leading to issues where old schema 
> versions may still be used despite an upgrade.
> This ticket proposes introducing a *schema versioning system* to manage 
> database schema changes in a more controlled manner



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to