-
Notifications
You must be signed in to change notification settings - Fork 47
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
[Bifrost] ReplicatedLoglet bifrost stubs #1683
Conversation
Bifrost providers are now initialized in two stages. An initialization that happens on startup to ensure all critical initialization and validation happens before server startup. After initialization, loglets will get a notification from watchdog to perform any background lazy initialization work if necessary. Benefits: - Removes the need to always "check if initialized" internally, or the use of "OnceLock" and other techniques to check if it's initialized or not. - Allows a potential validation step before server startup. Potentially fetching the metadata and validating all `LogletParams` for each provider in metadata against providers to reduce the chance of validation errors at construction time. - Allows construction of providers to be async without impacting providers' map access performance This PR also allows bifrost to be supplied a set of "Factories" to externalize how a loglet is constructed. This is crucial for the replicated-loglet since it depends on networking and other components that bifrost interface doesn't need to know about. A side benefit of this is that we can be very precise on which providers are _enabled_ for a given Bifrost instance. For example, InMemory loglet is now not allowed by default in restate-server binary (debateable if we should put it back or not)
Fixes tech-debt where open_db was not async (due to the requirement that bifrost provider construction was sync). This also uses BoxedLiveLoad in various places to simplify usage, cloning, and working with type-erased mapped `Live` objects.
Empty stubs for client-side replicated-loglet. Everything is gated behind feature `replicated-loglet`
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. +1 for merging :-)
@@ -46,6 +46,7 @@ pub enum Role { | |||
Admin, | |||
/// Serves the metadata store | |||
MetadataStore, | |||
#[cfg(feature = "replicated-loglet")] | |||
/// Serves a log server for replicated loglets | |||
LogServer, |
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.
A bit off-topic: If we want to support rolling back from this version, then we need to teach release-1.0
to ignore this role when deserializing it from the metadata-store. Right now it is panicking.
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.
Yes, there will definitely be an intermediate release before we can enable this. That release will be the safe fallback.
[Bifrost] ReplicatedLoglet bifrost stubs
Empty stubs for client-side replicated-loglet. Everything is gated behind feature
replicated-loglet
Stack created with Sapling. Best reviewed with ReviewStack.