shunping commented on code in PR #30317:
URL: https://github.com/apache/beam/pull/30317#discussion_r1492990264
##########
model/fn-execution/src/main/proto/org/apache/beam/model/fn_execution/v1/beam_fn_api.proto:
##########
@@ -1021,6 +1033,29 @@ message StateKey {
bytes map_key = 5;
}
+ // Represents a request for an ordered list of values associated with a
+ // specified user key and window for a PTransform. See
+ // https://s.apache.org/beam-fn-state-api-and-bundle-processing for further
+ // details.
+ //
+ // The response data stream will be a concatenation of all entries of sort
key
+ // and V's associated with the specified user key and window.
+ // See https://s.apache.org/beam-fn-api-send-and-receive-data for further
+ // details.
+ message OrderedListUserState {
+ // (Required) The id of the PTransform containing user state.
+ string transform_id = 1;
+ // (Required) The id of the user state.
+ string user_state_id = 2;
+ // (Required) The window encoded in a nested context.
+ bytes window = 3;
+ // (Required) The key of the currently executing element encoded in a
+ // nested context.
+ bytes key = 4;
+ // (optional) The sort key encoded in a nested context.
+ int64 sort_key = 5;
Review Comment:
The sort_key here is only used by FakeBeamFnStateClient. The purpose is to
store the internal data the same way as MultiMap.
We don't need it for any Insert/Update as the range/key is included in the
corresponding messages.
https://github.com/apache/beam/blob/5d7cd5e2e2e6b966ddb47cd78135b58013622d23/model/fn-execution/src/main/proto/org/apache/beam/model/fn_execution/v1/beam_fn_api.proto#L1122
https://github.com/apache/beam/blob/5d7cd5e2e2e6b966ddb47cd78135b58013622d23/model/fn-execution/src/main/proto/org/apache/beam/model/fn_execution/v1/beam_fn_api.proto#L1131
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]