vicennial commented on code in PR #54062:
URL: https://github.com/apache/spark/pull/54062#discussion_r2742553529
##########
sql/connect/common/src/main/protobuf/spark/connect/base.proto:
##########
@@ -1213,11 +1213,105 @@ message CloneSessionResponse {
// Session id of the new cloned session.
string new_session_id = 3;
-
+
// Server-side session ID of the new cloned session.
string new_server_side_session_id = 4;
}
+// Next ID: 6
+message GetStatusRequest {
+ // (Required)
+ //
+ // The session_id specifies a Spark session for a user identified by
user_context.user_id.
+ // The id should be an UUID string of the format
`00112233-4455-6677-8899-aabbccddeeff`
+ string session_id = 1;
+
+ // (Required)
+ //
+ // user_context.user_id and session_id both identify a unique remote spark
session on the
+ // server side.
+ UserContext user_context = 2;
+
+ // (Optional)
+ //
+ // Provides optional information about the client sending the request. This
field
+ // can be used for language or version specific information and is only
intended for
+ // logging purposes and will not be interpreted by the server.
+ optional string client_type = 3;
+
+ // (Optional)
+ //
+ // Server-side generated idempotency key from the previous responses (if
any). Server
+ // can use this to validate that the server side session has not changed.
+ optional string client_observed_server_side_session_id = 4;
+
+ // The type of status being requested.
+ // Implies mutually exlusive status types, e.g. session-level,
operation-level, other custom
+ // stats.
+ oneof status_type {
Review Comment:
I've been thinking about this and I'm conlficted between a top-level `oneof`
here vs a hybrid:
```protobuf
repeated StatusTypeRequest status_types = ...
message StatusTypeRequest {
oneof status_type {
...
}
}
```
The top-level oneof is simple and follows the principle of YAGNI but with
the context of this RPC being used for monitoring/polling, serving multiple
status types in a single round-trip would help avoid complexity on the client
side where it may need to look at several different points of information to
proceed.
@hvanhovell WDYT?
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]