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

Try to campaign when starting and being a voter #2657

Merged

Conversation

tillrohrmann
Copy link
Contributor

In order to avoid the delay of an election timeout when restarting a RaftMetadataServer,
they try to campaign immediately if they are part of the current configuration as voters.
This won't disturb an existing leader because we have pre-vote enabled.

Copy link
Contributor

@AhmedSoliman AhmedSoliman left a comment

Choose a reason for hiding this comment

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

Nice, let's test this out in practice. Thanks for improving failover.

This commit changes the LogsController::find_logs_tail operation to run the
find_tail operations per log concurrently instead of sequentially.
Instead we are printing only the PlainNodeId until we better know whether we
want to show the full MemberId.
This commit generifies the LogStoreMarker by moving it to restate-types,
renaming it into StorageMarker and making the id generic.
This commit uses the common StorageMarker to mark the RaftMetadataServer's
storage as initialized. The created_at timestamp will be used to identify
a RaftMetadataServer member uniquely across join attempts and to detect if
we lost the disk.
Before we stored the NodesConfiguration when running as a StandBy. However, by
the time we try to join, it might have changed so that we wouldn't reconstruct
the same state when restarting. This is now fixed.
It now logs the configuration when it applies/restores a new configuration.
In order to avoid the delay of an election timeout when restarting a RaftMetadataServer,
they try to campaing immediately if they are part of the current configuration as voters.
This won't disturb an existing leader because we have pre-vote enabled.
@tillrohrmann tillrohrmann force-pushed the metadata-store-improvements branch from 5b2b055 to c8f10ad Compare February 7, 2025 17:39
@tillrohrmann tillrohrmann merged commit c8f10ad into restatedev:main Feb 7, 2025
27 checks passed
@tillrohrmann tillrohrmann deleted the metadata-store-improvements branch February 7, 2025 20:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants