czy006 commented on code in PR #4320:
URL: https://github.com/apache/amoro/pull/4320#discussion_r3801491100
##########
amoro-ams/src/main/java/org/apache/amoro/server/DefaultOptimizingService.java:
##########
@@ -250,6 +250,26 @@ private void registerOptimizer(OptimizerInstance
optimizer, boolean needPersiste
optimizerScaleKeeper.onOptimizerRegistered(optimizer);
}
+ /**
+ * Registers optimizers recovered from persistence at startup. An optimizer
record referencing a
+ * resource group that no longer exists (e.g. the group was dropped while
AMS was down) is removed
+ * instead of failing the whole initialization, mirroring the tolerant
handling of the
+ * follower-sync path in {@code registerOptimizerWithoutPersist}.
+ */
+ void registerOptimizers(List<OptimizerInstance> optimizers) {
+ for (OptimizerInstance optimizer : optimizers) {
+ if (optimizingQueueByGroup.containsKey(optimizer.getGroupName())) {
Review Comment:
Thanks for the feedback. I need to further verify whether there are any
additional regressions in the high-availability setup.
--
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]