[
https://issues.apache.org/jira/browse/HDDS-11846?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17906999#comment-17906999
]
Arafat Khan commented on HDDS-11846:
------------------------------------
h3. We fixed code to make sure the three scenarios below, work correctly :-
h4. *Scenario 1: Fresh Install*
* *What Happens Now:*
** During a fresh install, all tables, including the schema version table, are
created for the first time.
** When the schema version table is created, it is initialized with the latest
SLV (Software Layout Version), indicating that the schema is already at the
latest state.
** The Recon Layout Version Manager will detect this value, and no upgrade
actions will be triggered since the metadata of all tables is already
up-to-date.
h4. *Scenario 2: Upgrade from a Cluster Without Schema Version Framework*
* *What Happens Now:*
** In clusters being upgraded where the schema version framework was not
present previously:
*** The schema version table is newly created while other tables already exist.
*** The MLV (Metadata Layout Version) is initialized to {{{}-1{}}}, indicating
the starting point of the upgrade framework.
** Only the necessary upgrade actions are executed to bring the schema from
the pre-upgrade state to the latest SLV.
** This ensures no redundant upgrades are applied, and the cluster is
transitioned smoothly.
h4. *Scenario 3: Upgrade from a Cluster with an Existing Schema Version
Framework*
* *What Happens Now:*
** In clusters where the schema version framework is already present:
*** The schema version table exists and contains the current MLV.
*** The Recon Layout Version Manager reads the MLV from the schema version
table and compares it with the SLV.
*** Upgrade actions for versions between the MLV and SLV are executed
sequentially to ensure the schema is brought to the latest state.
** Since the schema version table is already present, there are no redundant
or skipped upgrades.
> [Recon] Recon Schema version_number column is always set as -1
> --------------------------------------------------------------
>
> Key: HDDS-11846
> URL: https://issues.apache.org/jira/browse/HDDS-11846
> Project: Apache Ozone
> Issue Type: Bug
> Components: Ozone Recon
> Affects Versions: 2.0.0
> Reporter: Abhishek Pal
> Assignee: Arafat Khan
> Priority: Major
> Labels: pull-request-available
> Fix For: 2.0.0
>
>
> Recon Schema version was introduced as a part of
> [HDDS-11465|https://issues.apache.org/jira/browse/HDDS-11465] as a part of
> which we modify recon tables which might have changed in a later version in
> case of an upgrade.
> Currently the MetadataLayoutVersion is always set to -1 causing the upgrade
> handler to run even for fresh installs.
> This is coming from
> [ReconSchemaVersionTableManager#getCurrentSchemaVersion()|https://github.com/apache/ozone/blob/77ce962f3471383e4d3fa9abae79bde8dbfd9faf/hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/ReconSchemaVersionTableManager.java#L56].
> We should set this column to the version of the current code so that the
> upgrade handler doesn't run in case of a fresh install.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]