venkata91 opened a new pull request, #57219:
URL: https://github.com/apache/spark/pull/57219

   ### What changes were proposed in this pull request?
   
   Spark Connect identifies a session by `(userId, sessionId)`, and two users 
may share the same session UUID. The Connect UI listener/store keyed sessions 
by `sessionId` alone, so such sessions collapsed into one record (merged 
execution counts; one user's close finished/removed the other's row). History 
Server replay reproduced the same.
   
   This keys `SessionInfo`'s KVStore natural key and the listener's 
live-session map by a synthesized composite `uniqueId = userId/sessionId`. The 
UI session page and its links now pass `userId` alongside the session id.
   
   ### Why are the changes needed?
   
   Two users sharing a session UUID are distinct sessions in Spark Connect (see 
`SparkConnectServiceE2ESuite`), but the UI/status store merged them, showing 
incorrect counts and lifecycle state. Surfaced during review of SPARK-57941.
   
   ### Does this PR introduce _any_ user-facing change?
   
   The Connect session detail page now requires a `userId` request parameter in 
addition to `id`. Existing History Server disk stores written with the old 
`sessionId`-only key won't be found by the new lookup (detail page shows no 
info until regenerated); no store version bump.
   
   ### How was this patch tested?
   
   Added same-UUID/different-user coverage (live + History Server replay) in 
`SparkConnectServerListenerSuite`; updated `SparkConnectServerPageSuite`. 
`connect/testOnly org.apache.spark.sql.connect.ui.*` passes (11 tests).
   
   ### Was this patch authored or co-authored using generative AI tooling?
   
   Generated-by: Claude Code (Claude Opus 4.8)
   


-- 
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]

Reply via email to