You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2021/03/23 01:45:36 UTC

[GitHub] [spark] Ngone51 commented on a change in pull request #31871: [SPARK-34779][CORE] ExecutoMetricsPoller should keep stage entry in stageTCMP until a heartbeat occurs

Ngone51 commented on a change in pull request #31871:
URL: https://github.com/apache/spark/pull/31871#discussion_r599187411



##########
File path: core/src/main/scala/org/apache/spark/executor/ExecutorMetricsPoller.scala
##########
@@ -124,17 +124,11 @@ private[spark] class ExecutorMetricsPoller(
    */
   def onTaskCompletion(taskId: Long, stageId: Int, stageAttemptId: Int): Unit = {
     // Decrement the task count.
-    // Remove the entry from stageTCMP if the task count reaches zero.
 
     def decrementCount(stage: StageKey, countAndPeaks: TCMP): TCMP = {
       val countValue = countAndPeaks.count.decrementAndGet()

Review comment:
       Shall we add `assert(countValue >= 0)` here to ensure the task count doesn't go wrong? And then in `removeIfInactive`, we could use `v.count.get == 0`.




-- 
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:
users@infra.apache.org



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