HeartSaVioR commented on a change in pull request #25943: 
[WIP][SPARK-29261][SQL][CORE] Support recover live entities from KVStore for 
(SQL)AppStatusListener
URL: https://github.com/apache/spark/pull/25943#discussion_r333262295
 
 

 ##########
 File path: core/src/main/scala/org/apache/spark/status/AppStatusListener.scala
 ##########
 @@ -103,6 +104,81 @@ private[spark] class AppStatusListener(
     }
   }
 
+  // visible for tests
+  private[spark] def recoverLiveEntities(): Unit = {
+    if (!live) {
 
 Review comment:
   > I think our current usage of a live(true) AppStatusListener guarantees the 
empty KVStore at the initialization step. So I don't understand well for 
depends on the possibility ?
   
   That's a "context" we might have a chance to break eventually and as a 
side-effect it will break here. I'm in favor of doing defensive programming: if 
there're preconditions it should be mentioned anywhere or asserted. But I agree 
we don't have isEmpty api for KVStore - let's leave it as it is.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to