Deprecate OutboxMessage#4989
Conversation
Test Results 8 files ±0 8 suites ±0 2m 52s ⏱️ - 2m 18s Results for commit 952b288. ± Comparison against base commit d98e546. This pull request removes 2 tests. |
Switch the code paths that uses IngestionClient to start ingesting v2 Envelope instead of v1
Switch the worker's write path from the v1 Envelope/Command enum to v2
typed commands and Envelope<Raw>.
SelfProposer::{self_propose, self_propose_many, append_with_notification}
are now generic over `C: Command + HasRecordKeys` and derive the partition
key from the command via `record_keys()` — the explicit `partition_key`
parameter threaded through LeadershipState, the Actuator trait, and every
RPC handler is gone.
All worker RPC paths (append_invocation, append_invocation_response,
append_signal, cancel/kill/purge_invocation, purge_journal,
resume_invocation, restart_as_new_invocation, get_invocation_output) and
all leader-side ActionEffect proposals (Invoker, Shuffle, Timer, Cleaner,
UpsertSchema, UpsertRuleBook, scheduler decisions, version barriers,
AnnounceLeader) now construct typed commands::*Command values directly,
removing the Command::* enum wrapping and the BytesMut arena previously
used to pre-encode scheduler decisions.
With v2 envelopes now being written, drop the `try_v1_first` branch in
PartitionProcessor::decode_record — v2 is the fast path and v1 stays as
the TypedValueMismatch fallback for replay of older records. Tests under
leadership and rpc are updated to mock the new generic Actuator signatures
and decode via Envelope<Raw>::into_typed::<commands::*>().
Summary: This removes the `OutboxMessage` to: - Unify usage of v2 Command(s) - Avoid unecessary decoding of payloads when reading from the outbox and instead forward as is to remote partitions.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4e31a34807
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| self.bifrost_appender | ||
| .sender() | ||
| .enqueue(Arc::new(envelope)) | ||
| .enqueue(BodyWithKeys::new(envelope.into_raw(), keys)) |
There was a problem hiding this comment.
Bump compatibility before writing v2 envelopes
This starts writing v2 Envelope<Raw> records to Bifrost, but the compatibility marker still advertises data written by this binary as readable by Restate 1.6.0 (crates/types/src/cluster_marker.rs:36-39 even notes the required 1.7 bump). In any downgrade or failover/replay by a 1.6 binary after a 1.8 leader has appended one of these Custom/v2 WAL records, marker validation can pass and the old binary cannot decode the log, so please bump the forward-compatible version before enabling v2 writes.
Useful? React with 👍 / 👎.
Summary:
This removes the
OutboxMessageto:from the outbox and instead forward as is to remote partitions.
Stack created with Sapling. Best reviewed with ReviewStack.
OutboxMessage#4989ingestionto use V2 #4980