style95 commented on code in PR #5338:
URL: https://github.com/apache/openwhisk/pull/5338#discussion_r1009081275


##########
core/scheduler/src/main/scala/org/apache/openwhisk/core/scheduler/queue/MemoryQueue.scala:
##########
@@ -154,8 +168,8 @@ class MemoryQueue(private val etcdClient: EtcdClient,
   private val staleQueueRemovedMsg = QueueRemoved(invocationNamespace, 
action.toDocId.asDocInfo(revision), None)
   private val actionRetentionTimeout = 
MemoryQueue.getRetentionTimeout(actionMetaData, queueConfig)
 
-  private[queue] var containers = Set.empty[String]
-  private[queue] var creationIds = Set.empty[String]
+  private[queue] var containers = 
java.util.concurrent.ConcurrentHashMap.newKeySet[String]().asScala

Review Comment:
   Hm.. first, the etcd keys for running containers are handled by invokers so 
it's surprising you face the issue when you do a rolling deployment of 
schedulers. I think you need to trace the problematic container in the invoker.
   
   I haven't looked into it deeply yet but if there are any issues, it could be 
because of this though I haven't faced any so far.
   Not sure if there are any easily replaceable alternatives.
   
   ```
   private var requestBuffer = mutable.PriorityQueue.empty[BufferedRequest]
   ```
   
   Others are basically immutable collections, so I think it would be ok to use 
them in the context of Akka actor.
   If this really needs to be updated, I hope it is handled in a subsequent PR.



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

Reply via email to