You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "devabhishekpal (via GitHub)" <gi...@apache.org> on 2024/12/03 08:13:14 UTC

[PR] HDDS-11846. Set the schema version for Recon for fresh install [ozone]

devabhishekpal opened a new pull request, #7520:
URL: https://github.com/apache/ozone/pull/7520

   ## What changes were proposed in this pull request?
   HDDS-11846. Set the schema version for Recon for fresh install
   
   Please describe your PR in detail:
   * In the current Recon Schema version table, we do not set the version_number value to the table, this causes the version information to default to -1, causing upgrade handler to run even in case of fresh install
   * In case the version number is not already set for the schema version table - it indicates that this is a fresh install for Ozone.
   * In case of a fresh install, we need to set the `version_number` in the table to have a record of the MLV for later upgrade.
   * This PR adds the insertion of the version to the Schema version table in this scenario
   
   ## What is the link to the Apache JIRA
   
   https://issues.apache.org/jira/browse/HDDS-11846
   
   ## How was this patch tested?
   Patch was verified using unit tests, and manually tested to ensure the fix works


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


Re: [PR] HDDS-11846. Set the schema version for Recon for fresh install [ozone]

Posted by "devmadhuu (via GitHub)" <gi...@apache.org>.
devmadhuu commented on PR #7520:
URL: https://github.com/apache/ozone/pull/7520#issuecomment-2514158810

   > @devabhishekpal thanks for working on the patch, however this will not solve a scenario when a user is on some version say version 1 and once user tries to upgrade our new code containing version framework say version 2, then even though user already has ozone recon and previous tables, ideally even then though our recon upgrade framework is new, all upgrade actions must be run.
   
   So we have to handle 2 scenarios:
   1. Fresh cluster install where Recon is installed fresh.
   2. Upgrade to new cluster version, but framework is getting introduced first in the upgraded version.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


Re: [PR] HDDS-11846. Set the schema version for Recon for fresh install [ozone]

Posted by "devabhishekpal (via GitHub)" <gi...@apache.org>.
devabhishekpal commented on PR #7520:
URL: https://github.com/apache/ozone/pull/7520#issuecomment-2513877617

   Hi @devmadhuu @ArafatKhan2198, could you take a look at the PR?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


Re: [PR] HDDS-11846. Set the schema version for Recon for fresh install [ozone]

Posted by "sumitagrawl (via GitHub)" <gi...@apache.org>.
sumitagrawl commented on PR #7520:
URL: https://github.com/apache/ozone/pull/7520#issuecomment-2552923786

   No more required, another pull request present


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


Re: [PR] HDDS-11846. Set the schema version for Recon for fresh install [ozone]

Posted by "sumitagrawl (via GitHub)" <gi...@apache.org>.
sumitagrawl closed pull request #7520: HDDS-11846. Set the schema version for Recon for fresh install
URL: https://github.com/apache/ozone/pull/7520


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


Re: [PR] HDDS-11846. Set the schema version for Recon for fresh install [ozone]

Posted by "sumitagrawl (via GitHub)" <gi...@apache.org>.
sumitagrawl commented on code in PR #7520:
URL: https://github.com/apache/ozone/pull/7520#discussion_r1867426965


##########
hadoop-ozone/recon-codegen/src/main/java/org/hadoop/ozone/recon/schema/SchemaVersionTableDefinition.java:
##########
@@ -66,4 +68,16 @@ private void createSchemaVersionTable() throws SQLException {
         .execute();
   }
 
+  /**
+   * Insert the version of the MLV for the table if it doesn't already exist.
+   * @param version The version value to be inserted
+   * @throws SQLException If the insert operation failed
+   */
+  public void insertCurrentVersion(int version) throws SQLException {
+    if (!CHECK_COLUMN_HAS_VALUE.apply(conn, SCHEMA_VERSION_TABLE_NAME, "version_number")) {

Review Comment:
   if already have value, do this need make insertion fail, right? or some action required as version may not be one as expected.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org