From d51f6b12ffdc24fed11696baf847d347050b4075 Mon Sep 17 00:00:00 2001 From: Mohammad Dashti Date: Sat, 24 Oct 2026 09:21:05 -0700 Subject: [PATCH] Reserved auto_close in CreateStreamRequest and DescribeStreamResponse. A Stream's lifecycle is a resource manager, so no Store closes a Stream on its own. Reserving the numbers and names keeps a later field from reusing them. --- temporal/api/streamservice/v1/service.proto | 5 ++--- temporal/api/streamservice/v1/stream_service.proto | 14 +++++--------- 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/temporal/api/streamservice/v1/service.proto b/temporal/api/streamservice/v1/service.proto index a33fde932..ec8c928a1 100644 --- a/temporal/api/streamservice/v1/service.proto +++ b/temporal/api/streamservice/v1/service.proto @@ -18,7 +18,7 @@ import "temporal/api/streamservice/v1/stream_service.proto"; // `__temporal_system` endpoint, under the service name `temporal.api.streamservice.v1.StreamService`. // Activities and clients call this gRPC service. Each request names its namespace. service StreamService { - // CreateStream creates a Stream, idempotently for one id, one Retention and one auto close. + // CreateStream creates a Stream, idempotently for one id and one Retention. rpc CreateStream (CreateStreamRequest) returns (CreateStreamResponse) { } @@ -36,8 +36,7 @@ service StreamService { rpc ReadRecords (ReadRecordsRequest) returns (ReadRecordsResponse) { } - // DescribeStream answers the status, the newest offset, the Retention and the auto close of - // a Stream. + // DescribeStream answers the status, the newest offset and the Retention of a Stream. rpc DescribeStream (DescribeStreamRequest) returns (DescribeStreamResponse) { } } diff --git a/temporal/api/streamservice/v1/stream_service.proto b/temporal/api/streamservice/v1/stream_service.proto index 4a9e1468c..9f047f727 100644 --- a/temporal/api/streamservice/v1/stream_service.proto +++ b/temporal/api/streamservice/v1/stream_service.proto @@ -131,8 +131,7 @@ message StreamRecord { CloseStatus close_status = 9; } -// Idempotent for one id, one Retention and one auto_close. ALREADY_EXISTS for another -// Retention or another auto_close. +// Idempotent for one id and one Retention. ALREADY_EXISTS for another Retention. message CreateStreamRequest { string namespace = 1; // Required from Workflow code. @@ -141,11 +140,8 @@ message CreateStreamRequest { google.protobuf.Duration retention = 3; // Workflow only. A retry run's first create: the previous run, whose Records it withdraws. string withdraw_run = 4; - // Close the Stream with no result when no Record was appended for this long, counted from - // the create. Empty never closes on its own. It is separate from Retention and the safety - // TTL. The Store applies it on the next access, so no call sees the Stream open after the - // period. UNIMPLEMENTED (detail stream_unsupported) on a Store that can't. - google.protobuf.Duration auto_close = 5; + reserved 5; + reserved "auto_close"; // The Workflow run that owns the Stream. Workflow kind, with its run_id and epoch. Producer owner = 6; // Close the Stream with the result or the failure of the owner's run chain when the chain @@ -282,8 +278,8 @@ message DescribeStreamResponse { // Zero when the Stream has no Record. int64 last_offset = 2; google.protobuf.Duration retention = 3; - // The auto_close of the create. Empty when the Stream has none. - google.protobuf.Duration auto_close = 4; + reserved 4; + reserved "auto_close"; } // The details of a failed Stream call, in the gRPC status details and in the details of the