-
Notifications
You must be signed in to change notification settings - Fork 334
[improve]: Support multiple nodes to access Amoro Rest service in a high availability environment #3567
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
934c69a
to
eba90fe
Compare
…ility environment
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #3567 +/- ##
=========================================
Coverage 21.76% 21.77%
Complexity 2391 2391
=========================================
Files 431 433 +2
Lines 40501 40481 -20
Branches 5745 5743 -2
=========================================
- Hits 8816 8813 -3
+ Misses 30938 30921 -17
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:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for the work! I left a minor comment, PTAL.
amoro-ams/src/main/java/org/apache/amoro/server/AmoroServiceContainer.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good in total
amoro-ams/src/main/java/org/apache/amoro/server/AmoroServiceContainer.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. But I'm not good at HA serivces, take my +1.
service.waitFollowerShip(); | ||
// become follower, dispose optimizingService stop | ||
service.stopOptimizingService(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But the finally block will dispose all services. so you should use stopOptimizingService to repalce dsipose in finally block ?
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