[AMORO-2810]: Support multiple nodes to access Amoro Rest service in a high availability environment#3567
[AMORO-2810]: Support multiple nodes to access Amoro Rest service in a high availability environment#3567czy006 wants to merge 8 commits into
Conversation
934c69a to
eba90fe
Compare
…ility environment
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3567 +/- ##
=========================================
Coverage 21.76% 21.76%
Complexity 2391 2391
=========================================
Files 436 436
Lines 40498 40498
Branches 5743 5743
=========================================
Hits 8816 8816
Misses 30935 30935
Partials 747 747
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
zhoujinsong
left a comment
There was a problem hiding this comment.
Thanks a lot for the work! I left a minor comment, PTAL.
xxubai
left a comment
There was a problem hiding this comment.
LGTM. But I'm not good at HA serivces, take my +1.
| service.startOptimizingService(); | ||
| service.waitFollowerShip(); | ||
| // become follower, dispose optimizingService stop | ||
| service.stopOptimizingService(); |
There was a problem hiding this comment.
Why didn't you put this in service.dispose? or you may change service.dispose in finally block to service.stopOptimizingService ???
There was a problem hiding this comment.
dispose will be close all service (include rest) .if this node become follower,we just close optimizingService,and will be run waitting become Leader service.waitLeaderShip()
There was a problem hiding this comment.
But the finally block will dispose all services. so you should use stopOptimizingService to repalce dsipose in finally block ?
There was a problem hiding this comment.
Thanks for the feedback. I am using the new logic to verify it, which will take some time. At the same time, we are designing a more general high-availability solution, which will support K8S in the future and will be launched later. cc @Aireed @zhoujinsong @klion26
There was a problem hiding this comment.
Sounds great! Look forward it!
|
Sorry for jumping in this late. After this change, will there be two Amoro servers handle the same table update( |
Optimization services will not be processed simultaneously, we ensure that only one master node handles Optimizer. Other child nodes can handle Rest requests, such as creating and deleting catalogs. Will this have an impact? |
As there is more than one server that will update the same table's info/state, we need to handle this carefully to avoid the inconsistent state of concurrent modification. Maybe we need to add a doc to analysis this |
|
Rplaced by #3737. |

Support multiple nodes to access Amoro Rest service in a high availability environment
Why are the changes needed?
Close #2810.
Brief change log
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
Run test locally before making a pull request
Documentation