xiongbo-sjtu commented on code in PR #43021:
URL: https://github.com/apache/spark/pull/43021#discussion_r1337996350


##########
core/src/test/scala/org/apache/spark/executor/CoarseGrainedExecutorBackendSuite.scala:
##########
@@ -302,7 +302,12 @@ class CoarseGrainedExecutorBackendSuite extends 
SparkFunSuite
           resourceProfile = ResourceProfile.getOrCreateDefaultProfile(conf))
       assert(backend.taskResources.isEmpty)
 
-      val taskId = 1000000
+      // Ensure thread-safety 
(https://issues.apache.org/jira/browse/SPARK-45227)
+      assert(backend.taskResources.isInstanceOf[
+        ConcurrentMap[Long, Map[String, ResourceInformation]]
+      ])

Review Comment:
   The above `assert` logic was added so that the thread-safety data structure 
(i.e., CMH) will not be unintentionally refactored away later.  That's why I 
think that it's better for us to keep the logic here.



-- 
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: reviews-unsubscr...@spark.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to