vanzin commented on a change in pull request #24616: [SPARK-27726] [Core] Fix
performance of ElementTrackingStore deletes when using InMemoryStore under high
loads
URL: https://github.com/apache/spark/pull/24616#discussion_r285313778
##########
File path:
core/src/main/scala/org/apache/spark/status/ElementTrackingStore.scala
##########
@@ -46,7 +50,28 @@ import org.apache.spark.util.kvstore._
*/
private[spark] class ElementTrackingStore(store: KVStore, conf: SparkConf)
extends KVStore {
- private val triggers = new HashMap[Class[_], Seq[Trigger[_]]]()
+ private class LatchedTriggers(val triggers: Seq[Trigger[_]]) {
+ private val pending = new AtomicBoolean(false)
+
+ def fireOnce(f: Seq[Trigger[_]] => Unit): WriteQueueResult = {
+ val shouldEnqueue = pending.compareAndSet(false, true)
Review comment:
Actually don't need this variable now.
----------------------------------------------------------------
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]