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/25 21:54:48 UTC

[GitHub] [spark] dhruve commented on a change in pull request #31945: [SPARK-34845][CORE] ProcfsMetricsGetter shouldn't return partial procfs metrics

dhruve commented on a change in pull request #31945:
URL: https://github.com/apache/spark/pull/31945#discussion_r601864462



##########
File path: core/src/main/scala/org/apache/spark/executor/ProcfsMetricsGetter.scala
##########
@@ -210,11 +212,16 @@ private[spark] class ProcfsMetricsGetter(procfsDir: String = "/proc/") extends L
     val pids = computeProcessTree
     var allMetrics = ProcfsMetrics(0, 0, 0, 0, 0, 0)
     for (p <- pids) {

Review comment:
       We could avoid this race by figuring out the pid/child pids and immediately do a stat. Turning the pids or computeProcessTree in an iterator should help solve this issue.




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