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:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]