venkata91 commented on code in PR #57016:
URL: https://github.com/apache/spark/pull/57016#discussion_r3539815629
##########
sql/connect/server/src/main/scala/org/apache/spark/sql/connect/ui/SparkConnectServerAppStatusStore.scala:
##########
@@ -55,6 +55,23 @@ class SparkConnectServerAppStatusStore(store: KVStore) {
}
}
+ /**
+ * Look up an execution by its operation id. Unlike the primary key (the job
tag, which embeds
+ * the raw user id and may therefore contain characters that are unsafe in a
URL path segment),
+ * the operation id is always a UUID and is safe to use as a REST path
parameter. Returns the
+ * first match; the operation id is unique within a session.
+ */
+ def getExecutionByOperationId(operationId: String): Option[ExecutionInfo] = {
+ KVUtils
+ .viewToSeq(
+ store
+ .view(classOf[ExecutionInfo])
+ .index("operationId")
+ .first(operationId)
+ .last(operationId))
+ .headOption
Review Comment:
Gret catch. Switched the detail lookup to the unique job tag: the route is
now `operations/detail?jobTag=...` keying on the natural key via `store.read`,
so a shared `operationId` across sessions no longer collapses. Added a
duplicate-operationId-across-sessions test.
--
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]