-
Notifications
You must be signed in to change notification settings - Fork 1.7k
[ENH]: Leader election for SysDB #5104
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
Conversation
Reviewer ChecklistPlease leverage this checklist to ensure your code review is thorough before approving Testing, Bugs, Errors, Logs, Documentation
System Compatibility
Quality
|
|
Leader Election Support for SysDB and Codebase Refactor This PR implements leader election in the SysDB service using the Kubernetes leader election API, ensuring that only the elected leader performs memberlist management. To enable this, the previously log-service-specific leader election code is refactored and moved to a shared package, with corresponding changes across Go service wiring and Kubernetes deployment files. Additional RBAC and environment variable settings are introduced for correct operation in Kubernetes, and the lease-watcher role is separated into its own YAML manifest. Key Changes• Added leader election for SysDB via shared 'pkg/leader' (moved from log service code). Affected Areas• SysDB server initialization and lifecycle (Go) This summary was automatically generated by @propel-code-bot |
3d5d50c
to
41a9205
Compare
41a9205
to
f5f71a3
Compare
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.
Should sync up with Evan/Jason on how to deploy the newly created/updated helm charts
## Description of changes Bump helm chart. This should have been done as a part [of](#5104). ## Test plan N/A - [ ] Tests pass locally with `pytest` for python, `yarn test` for js, `cargo test` for rust ## Migration plan N/A ## Observability plan N/A ## Documentation Changes N/A
Description of changes
This change introduces leader election in the SysDB service in preparation to scale out this layer. After this change, only the leader monitors and updates the member list. Not that the leader election in question just reuses the Kubernetes leader election API so it is not strongly consistent and can lead to split-brain scenarios. These split-brain scenarios are not harmful here.
Since this change reuses the leader election code that's already in the log service, that code has been moved out of the log service directory.
Test plan
Observing log statements on local tilt.
pytest
for python,yarn test
for js,cargo test
for rustMigration plan
N/A. Before scaling out the SysDB layer, make sure this change is in the SysDB binary.
Observability plan
N/A
Documentation Changes
Are all docstrings for user-facing APIs updated if required? Do we need to make documentation changes in the docs section?