ArafatKhan2198 commented on code in PR #8938:
URL: https://github.com/apache/ozone/pull/8938#discussion_r2281023430
##########
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/ReconUtils.java:
##########
@@ -131,9 +132,36 @@ public static boolean triggerAsyncNSSummaryRebuild(
ReconNamespaceSummaryManager reconNamespaceSummaryManager,
ReconOMMetadataManager omMetadataManager) {
+ // Check if a rebuild is already in progress
+ if (getNSSummaryRebuildState() == NSSummaryTask.RebuildState.RUNNING) {
+ log.info("NSSummary rebuild already in progress; skipping duplicate
trigger.");
+ return false;
+ }
+
// Submit rebuild task to single thread executor for async execution
NSSUMMARY_REBUILD_EXECUTOR.submit(() -> {
try {
+ // Wait for OM tables to be initialized before proceeding
+ long maxWaitMillis = 300_000L; // 5 minutes
+ long waited = 0L;
+ long waitInterval = 1000L; // 1 second
+
+ while (!omMetadataManager.isOmTablesInitialized() && waited <
maxWaitMillis) {
Review Comment:
Changed as discussed!
##########
hadoop-ozone/recon-codegen/src/main/java/org/apache/ozone/recon/schema/SchemaVersionTableDefinition.java:
##########
@@ -90,7 +90,7 @@ private void insertInitialSLV(DSLContext dslContext, int slv)
{
dslContext.insertInto(DSL.table(SCHEMA_VERSION_TABLE_NAME))
.columns(DSL.field(name("version_number")),
DSL.field(name("applied_on")))
- .values(slv, DSL.currentTimestamp())
+ .values(2, DSL.currentTimestamp())
Review Comment:
done
--
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]