Skip to content
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 Readiness From VNode State [DB-284] #3935

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

thefringeninja
Copy link
Contributor

Nodes are not ready to handle outside traffic unless they are in the leader, follower, or readonly replica states.

@thefringeninja thefringeninja self-assigned this Aug 18, 2023
@alexeyzimarev alexeyzimarev changed the title Base Readiness From VNode State Base Readiness From VNode State [DB-284] Aug 23, 2023
@@ -244,9 +244,8 @@ IServiceProvider IStartup.ConfigureServices(IServiceCollection services) => Conf
.Services,
(s, subsystem) => subsystem.ConfigureServices(s));

public void Handle(SystemMessage.SystemReady _) => _ready = true;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SystemReady is only sent once the AuthenticationProvider is initialised (and subsystems and so on). So it would be worth listening for that still, because the AuthenticationProvider creates the admin user as part of initialization, but after becomming leader.

Monitoring the state as this PR does is still a nice improvement, because it allows the readiness endpoint to start returning false later if the node transitions to e.g. Unknown state.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants