Skip to content

Deprecate OutboxMessage#4989

Draft
muhamadazmy wants to merge 4 commits into
mainfrom
pr4989
Draft

Deprecate OutboxMessage#4989
muhamadazmy wants to merge 4 commits into
mainfrom
pr4989

Conversation

@muhamadazmy

@muhamadazmy muhamadazmy commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

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.

Stack created with Sapling. Best reviewed with ReviewStack.

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.
@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown

Test Results

  8 files  ±0    8 suites  ±0   2m 52s ⏱️ - 2m 18s
 59 tests  - 2   59 ✅  - 2  0 💤 ±0  0 ❌ ±0 
266 runs   - 2  266 ✅  - 2  0 💤 ±0  0 ❌ ±0 

Results for commit 952b288. ± Comparison against base commit d98e546.

This pull request removes 2 tests.
dev.restate.sdktesting.tests.Custom ‑ run(CustomTestConfig, URI, URI)[1]
dev.restate.sdktesting.tests.ServiceToServiceScopeConcurrency ‑ scopeAndLimitKeyArePropagatedOnServiceToServiceCalls(URI, ContainerHandle, Client)

@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown

Test Results

  8 files  ±0    8 suites  ±0   5m 5s ⏱️ -5s
 61 tests ±0   61 ✅ ±0  0 💤 ±0  0 ❌ ±0 
268 runs  ±0  268 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit 952b288. ± Comparison against base commit d98e546.

♻️ This comment has been updated with latest results.

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.

1 participant