andyhuangdev commented on code in PR #11650:
URL: https://github.com/apache/ozone/pull/11650#discussion_r4558976764
##########
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:
Could we persist the pending NSSummary rebuild until it completes? The
upgrade actions attempt to queue the rebuild before the OM metadata manager is
initialized, so checkpoint creation fails and the retry is tracked only in
memory. Finalization still advances the persisted schema version to the
software version.
If Recon restarts before the first sync, the retry flag is lost and the
upgrade actions are skipped. The task cursors all default to zero in the new
SQL DB, so the startup cursor comparison does not trigger a rebuild either.
--
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]