You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@amoro.apache.org by "zhoujinsong (via GitHub)" <gi...@apache.org> on 2026/08/26 06:38:02 UTC

[PR] Unify the main process of amoro service container [amoro]

zhoujinsong opened a new pull request, #4339:
URL: https://github.com/apache/amoro/pull/4339

   <!--
   Thanks for sending a pull request!
   
   Here are some tips for you:
     1. If this is your first time, please read our contributor guidelines: https://amoro.apache.org/how-to-contribute/
     2. If the PR is related to an issue in https://github.com/apache/amoro/issues, add '[AMORO-XXXX]' in your PR title, e.g., '[AMORO-XXXX] Your PR title ...'.
     3. If the PR is unfinished, add '[WIP]' in your PR title, e.g., '[WIP][AMORO-XXXX] Your PR title ...'.
   -->
   
   ## Why are the changes needed?
   <!--
   Please clarify why the changes are needed. For instance,
     1. If you add a feature, you can talk about its use case.
     2. If you fix a bug, you can clarify why it is a bug.
     3. Use Fix/Resolve/Close #{ISSUE_NUMBER} to link this PR to its related issue
   -->
   
   #3670 introduced a new master-slave mode for Amoro. However, many implementations adopted separate code paths for this mode. While this reduced intrusion into the legacy code, it is not conducive to long-term maintenance. This PR refactors the main process of `AmoroServiceContainer` to unify the handling logic.
   
   ## Brief change log
   <!--
   Clearly describe the changes made in modules, classes, methods, etc.
   -->
   
   - As title
   
   ## How was this patch tested?
   
   - [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible
   
   - [ ] Add screenshots for manual tests if appropriate
   
   - [x] Run test locally before making a pull request
   
   ## Documentation
   
   - Does this pull request introduce a new feature? (yes / no)
   - If yes, how is the feature documented? (not applicable / docs / JavaDocs / not documented)
   


-- 
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: commits-unsubscribe@amoro.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Refactor] Unify the main process of amoro service container [amoro]

Posted by "zhoujinsong (via GitHub)" <gi...@apache.org>.
zhoujinsong commented on code in PR #4339:
URL: https://github.com/apache/amoro/pull/4339#discussion_r3878721391


##########
amoro-ams/src/main/java/org/apache/amoro/server/AmoroServiceContainer.java:
##########
@@ -316,11 +348,6 @@ public void disposeOptimizingService() {
       LOG.info("Stopping optimizing server[serving:{}] ...", optimizingServiceServer.isServing());
       optimizingServiceServer.stop();
     }
-    if (amsAssignService != null) {

Review Comment:
   Yes, we may stop the leader service first, if necessary, when disposing.
   I have made some change, PTAL.



##########
amoro-ams/src/main/java/org/apache/amoro/server/AmoroServiceContainer.java:
##########
@@ -316,11 +348,6 @@ public void disposeOptimizingService() {
       LOG.info("Stopping optimizing server[serving:{}] ...", optimizingServiceServer.isServing());
       optimizingServiceServer.stop();
     }
-    if (amsAssignService != null) {

Review Comment:
   Yes, we may stop the leader service first, if necessary, when disposing.
   I have made some changes, PTAL.



-- 
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: commits-unsubscribe@amoro.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Refactor] Unify the main process of amoro service container [amoro]

Posted by "xxubai (via GitHub)" <gi...@apache.org>.
xxubai commented on code in PR #4339:
URL: https://github.com/apache/amoro/pull/4339#discussion_r3878212339


##########
amoro-ams/src/main/java/org/apache/amoro/server/AmoroServiceContainer.java:
##########
@@ -316,11 +348,6 @@ public void disposeOptimizingService() {
       LOG.info("Stopping optimizing server[serving:{}] ...", optimizingServiceServer.isServing());
       optimizingServiceServer.stop();
     }
-    if (amsAssignService != null) {

Review Comment:
   `dispose()` still calls `disposeOptimizingService()` directly from the shutdown hook. Will it cause the `ams-assign-scheduler` running while the other services are being disposed?



-- 
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: commits-unsubscribe@amoro.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Refactor] Unify the main process of amoro service container [amoro]

Posted by "czy006 (via GitHub)" <gi...@apache.org>.
czy006 merged PR #4339:
URL: https://github.com/apache/amoro/pull/4339


-- 
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: commits-unsubscribe@amoro.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org