venkata91 commented on code in PR #57219:
URL: https://github.com/apache/spark/pull/57219#discussion_r3643077201


##########
sql/connect/server/src/main/scala/org/apache/spark/sql/connect/ui/SparkConnectServerAppStatusStore.scala:
##########
@@ -74,11 +74,16 @@ class SparkConnectServerAppStatusStore(store: KVStore) {
 }
 
 private[connect] class SessionInfo(
-    @KVIndexParam val sessionId: String,
+    val sessionId: String,
     val startTimestamp: Long,
     val userId: String,
     val finishTimestamp: Long,
     val totalExecution: Long) {
+  // Natural key. A session is identified by (userId, sessionId), since two 
users may share the
+  // same session UUID; keying on sessionId alone would merge them into one 
record.
+  @KVIndexParam

Review Comment:
   @sunchao I agree with your point, my fix doesn't handle the collision case 
fully, there can be a rarest case of collision but that is the trade-off which 
is documented as the alternative to invalidate the cache by bumping the 
`AppStatusStore.CURRENT_VERSION`, isn't it?
   
   Do you feel strongly about pivoting to invalidating by bumping the 
`AppStatusStore.CURRENT_VERSION`? 



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