From f65ec4079b94fa40aa8b9d46fbc061e90387ca9a Mon Sep 17 00:00:00 2001 From: wolfchris Date: Mon, 3 Nov 2025 14:54:02 +0000 Subject: [PATCH 1/2] Adds proto fields for overwriting fetch/write state functionality --- .../apache/beam/model/fn_execution/v1/beam_fn_api.proto | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/model/fn-execution/src/main/proto/org/apache/beam/model/fn_execution/v1/beam_fn_api.proto b/model/fn-execution/src/main/proto/org/apache/beam/model/fn_execution/v1/beam_fn_api.proto index 4eee2ef5d89f..87ad137a9274 100644 --- a/model/fn-execution/src/main/proto/org/apache/beam/model/fn_execution/v1/beam_fn_api.proto +++ b/model/fn-execution/src/main/proto/org/apache/beam/model/fn_execution/v1/beam_fn_api.proto @@ -415,6 +415,15 @@ message ProcessBundleRequest { // beam:protocol:control_request_elements_embedding:v1 capability. See more // at https://s.apache.org/beam-fn-api-control-data-embedding. Elements elements = 3; + + // indicates that the runner has no start for the keys in this bundle + // so SDk can safely begin stateful processing with a locally-generated + // initial empty state + bool has_no_keyed_state = 4; + + // indicates that the runner will never process another bundle for the keys + // in this bundle so state need not be included in the bundle commit. + bool only_bundle_for_keys = 5; } message ProcessBundleResponse { From 95a669b38e51a708c37e3caf823298445343a754 Mon Sep 17 00:00:00 2001 From: wolfchris Date: Fri, 14 Nov 2025 16:51:32 +0000 Subject: [PATCH 2/2] Adds fields to ProcessBundleRequest to prepare for future SDK skips for fetching/writing state. --- .../org/apache/beam/model/fn_execution/v1/beam_fn_api.proto | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/model/fn-execution/src/main/proto/org/apache/beam/model/fn_execution/v1/beam_fn_api.proto b/model/fn-execution/src/main/proto/org/apache/beam/model/fn_execution/v1/beam_fn_api.proto index 87ad137a9274..4d907f2ac724 100644 --- a/model/fn-execution/src/main/proto/org/apache/beam/model/fn_execution/v1/beam_fn_api.proto +++ b/model/fn-execution/src/main/proto/org/apache/beam/model/fn_execution/v1/beam_fn_api.proto @@ -416,10 +416,10 @@ message ProcessBundleRequest { // at https://s.apache.org/beam-fn-api-control-data-embedding. Elements elements = 3; - // indicates that the runner has no start for the keys in this bundle + // indicates that the runner has no stare for the keys in this bundle // so SDk can safely begin stateful processing with a locally-generated // initial empty state - bool has_no_keyed_state = 4; + bool has_no_state = 4; // indicates that the runner will never process another bundle for the keys // in this bundle so state need not be included in the bundle commit.