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

Replaces the consensus module with Bifrost #1253

Merged
merged 27 commits into from
Mar 6, 2024

Conversation

tillrohrmann
Copy link
Contributor

@tillrohrmann tillrohrmann commented Mar 1, 2024

This PR is currently based on #1250.

Important: With this PR we are temporarily losing durability because we are only relying on the MemoryLoglet.

I will add a more thorough description soon.

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.

Very nicely executed. Very impressive work. Feel free to follow up on future PRs to unblock. Also, this needs to be rebased on #1256.

crates/bifrost/src/lib.rs Outdated Show resolved Hide resolved
crates/node/src/lib.rs Outdated Show resolved Hide resolved
crates/storage-rocksdb/src/deduplication_table/mod.rs Outdated Show resolved Hide resolved
crates/types/src/dedup.rs Show resolved Hide resolved
header,
Command::InvokerEffect(invoker_output),
))
.await?;
Copy link
Contributor

Choose a reason for hiding this comment

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

Same comment about handling bifrost failures and crashing the node.

crates/worker/src/lib.rs Show resolved Hide resolved
crates/worker/src/partition/mod.rs Outdated Show resolved Hide resolved
crates/worker/src/partition/leadership/mod.rs Show resolved Hide resolved
crates/worker/src/partition/leadership/mod.rs Outdated Show resolved Hide resolved
@tillrohrmann
Copy link
Contributor Author

Rebased onto #1256. Will address the review feedback as a next step. Thanks a lot for it @AhmedSoliman.

@tillrohrmann
Copy link
Contributor Author

Rebasing the PR onto the latest main.

@tillrohrmann
Copy link
Contributor Author

Rebased on latest master and fixed a few bugs which made the e2e tests fail. Now they should pass. I will now address your comments, Ahmed.

This commit removes the in-memory channel from which the PartitionProcessor
receives messages from the Consensus module with Bifrost. This makes the
PartitionProcessor independent of the Consensus module.
This commit replaces the in-memory channels with Bifrost in the
Shuffle component.
By letting the AdminSerivce directly write messages to Bifrost,
we can remove the Worker services.
By letting the ingress-dispatcher directly write to Bifrost,
we no longer need the in-memory network channel.
With the introduction of Bifrost, we are no longer acking the reception
of messages.
The dedup information is now sent as part of the destination field
of the header. Therefore, these fields are no longer needed.
We are now sending dedup information as part of the destination
field of the header. Therefore, the sequence_number field is no
longer needed.
…oglet

An Lsn::INVALID with base Lsn::OLDEST should translate into LogletOffset::INVALID
instead of LogletOffset::OLDEST.

The MemoryLoglet needs to add 1 to its index because the underlying array index
is 0-based.
During Worker construction metadata() has not been properly initialized.
Until we go distributed there will be exactly one PartitionProcessor per
log which can become leader when it starts.
…omponents

This commit removes the with_bifrost function as it turned out to be more
confusing than helping. Passing the Bifrost dependency explicitly to the
components that need it turned out to be a lot simpler and easier to understand.
Since we are no longer requiring to flush writes to RocksDB, the existing
batching mechanism might no longer needed. Moreover, it adds complexity which
could be avoided until we assert that batching of commands has a measurable
impact on Restate's performance. Until then and in order to make the future
development a bit easier, we remove it.
@tillrohrmann tillrohrmann merged commit d1d9f87 into restatedev:main Mar 6, 2024
5 checks passed
@tillrohrmann tillrohrmann deleted the issues/1216 branch March 6, 2024 14:05
@tillrohrmann tillrohrmann linked an issue Mar 6, 2024 that may be closed by this pull request
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.

Update partition processor to use Bifrost for reading commands
2 participants