xxubai commented on code in PR #3927:
URL: https://github.com/apache/amoro/pull/3927#discussion_r2985841107


##########
amoro-ams/src/main/java/org/apache/amoro/server/AmoroServiceContainer.java:
##########
@@ -250,12 +250,23 @@ public void startOptimizingService() throws Exception {
 
     DefaultTableRuntimeFactory defaultRuntimeFactory = new 
DefaultTableRuntimeFactory();
     defaultRuntimeFactory.initialize(processFactories);
-    // In master-slave mode, create AmsAssignService for bucket assignment
+
+    BucketAssignStore bucketAssignStore = null;
     if (IS_MASTER_SLAVE_MODE && haContainer != null) {
       try {
-        // Create and start AmsAssignService for bucket assignment
-        // The factory will handle different HA types (ZK, database, etc.)
-        amsAssignService = new AmsAssignService(haContainer, serviceConfig);
+        bucketAssignStore = BucketAssignStoreFactory.create(haContainer, 
serviceConfig);

Review Comment:
   If I understand correctly, when BucketAssignStore initialization fails, the 
service does not fully fall back to non-master-slave behavior. `initialize()` 
falls back to loading all table runtimes because bucketAssignStore is null, but 
other paths still keep master-slave semantics, for example only the leader runs 
`exploreTableRuntimes()` and `triggerTableAdded()` may still return early 
without creating local runtimes. This can leave the in-memory table runtime 
state inconsistent with the expected runtime state derived from the database.



-- 
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]

Reply via email to