chihsuan commented on code in PR #11650:
URL: https://github.com/apache/ozone/pull/11650#discussion_r4577560873
##########
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/ReconServer.java:
##########
@@ -167,7 +171,15 @@ public Void call() throws Exception {
injector.getInstance(ReconSchemaManager.class);
LOG.info("Creating Recon Schema.");
- reconSchemaManager.createReconSchema();
+ // A new SQL DB on an existing Recon (for example after the move from
Derby to SQLite) cannot tell which upgrade
+ // actions the derived data already has, so start from the initial
version to run all of them.
+ ReconVersion newSqlDbVersion = existingInstall ?
ReconVersion.INITIAL_VERSION : ReconVersion.SOFTWARE_VERSION;
+ reconSchemaManager.createReconSchema(newSqlDbVersion);
Review Comment:
+1 to a follow-up.
I tried a real 2.2.1 upgrade and noticed four ERROR lines at startup,
because the rebuild can't be queued before the first sync. Maybe follow-up
could keep the Recon version and a pending-rebuild marker in the VERSION file,
which might fix both issues.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]