-
Notifications
You must be signed in to change notification settings - Fork 10.6k
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
Chore: Move service shutdown logic to each service #27690
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #27690 +/- ##
===========================================
- Coverage 42.01% 41.96% -0.06%
===========================================
Files 844 811 -33
Lines 17751 17158 -593
Branches 2009 1908 -101
===========================================
- Hits 7458 7200 -258
+ Misses 10029 9719 -310
+ Partials 264 239 -25
Flags with carried forward coverage won't be shown. Click here to find out more. |
const firstNode = nodes.sort().shift(); | ||
|
||
// if the first node is the current node and there are others nodes running the same service, then it should shutdown | ||
return firstNode === this.broker.nodeID && nodes.length > 0; |
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.
So in rare cases.. this might depend on outside orchestrator to pop a node back online? Lets say if there are 2 nodes and both happen to perform this check and make decision at same time
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.
no, that's what the sort
tries to solve.. if 2 nodes online performing the check at the same time, the "first node" will be the same for both, that means only one of them will shut down.
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.
Got it! That makes sense 👍
…etChat/Rocket.Chat into matrixSearch * 'feat/federation-search-public-rooms' of github.com:RocketChat/Rocket.Chat: Chore: Move service shutdown logic to each service (#27690) Chore: change colors to dark theme on Marketplace (#27532) Chore: Update color tokens (#27704) Chore: Remove medium prop from ButtonGroup (#27784) Regression: Add support for 2FA errors to `Meteor.callAsync` (#27767) [NEW] Attachment Files Redesign (#27470) [FIX] App page showing version undefined for apps not in marketplace (#27766) Chore: Add surface-light background to AppRow (#27765)
Proposed changes (including videos or screenshots)
Issue(s)
ARCH-120
Steps to test or reproduce
Further comments