LuciferYang commented on a change in pull request #31517:
URL: https://github.com/apache/spark/pull/31517#discussion_r600131352



##########
File path: 
core/src/main/scala/org/apache/spark/deploy/history/ApplicationCache.scala
##########
@@ -223,7 +224,10 @@ private[history] class ApplicationCache(
     }
   }
 
-  def invalidate(key: CacheKey): Unit = appCache.invalidate(key)
+  def invalidate(key: CacheKey): Unit = appCache.asMap().computeIfPresent(key, 
(key, value) => {

Review comment:
       > @LuciferYang This can be accomplished by using 
cache.asMap().computeIfPresent instead of invalidate. Then you may callback 
manually within the atomic operation and return null to remove the entry.
   
   @ben-manes Do you mean that?




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



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

Reply via email to