Skip to content

[Brook] Added the owner Workflow to StreamRef. - #24

Closed
moetemp wants to merge 1 commit into
moe/brook/v3/s7-memory-storefrom
moe/brook/v3/s8-stream-ref-owner
Closed

moetemp wants to merge 1 commit into
moe/brook/v3/s7-memory-storefrom
moe/brook/v3/s8-stream-ref-owner

Conversation

@moetemp

@moetemp moetemp commented Oct 21, 2026

Copy link
Copy Markdown
Owner

What changed?

This PR adds two optional fields to StreamRef: workflow_id = 2 and first_execution_run_id = 3. A Workflow's ref sets them. A standalone, client or Activity ref leaves them empty. The Store keys on id only and never reads them, so a write or a read never fails because they are missing or disagree with the id. The crate builds a StreamRef only in the CreateStream answer, which has no owner to give, so it leaves them empty there.

Why?

DECISIONS S30. A Reader that gets a Workflow's ref can find the Workflow with no parse of the id.

How did you test it?

STREAMS_REQUIRE=redis cargo test -p temporalio-streams, on standalone Redis, cluster Redis and the memory Store. A new test writes through a ref with the owner fields, one without them and one with fields that don't match, and reads the same Stream through both. The Workflow tests now buffer calls with full Workflow refs.

  • Unit Tests
  • Staging
  • End to End Tests

A Reader that gets a Workflow's ref can find the Workflow with no parse of the id. The Store still keys on the id alone, so a ref with or without the owner reaches the same Stream.
@moetemp

moetemp commented Oct 25, 2026

Copy link
Copy Markdown
Owner Author

Closing as stale. This layer is folded into the v5 tip, #41, and the upstream review uses a fresh series instead. Plan: https://www.notion.so/4048fc567738814990b7c796ac28fe3f

@moetemp moetemp closed this Oct 25, 2026
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