tgravescs commented on code in PR #41173:
URL: https://github.com/apache/spark/pull/41173#discussion_r1199162022
##########
resource-managers/yarn/src/main/scala/org/apache/spark/deploy/yarn/YarnAllocator.scala:
##########
@@ -780,7 +771,7 @@ private[yarn] class YarnAllocator(
localResources,
rp.id
).run()
- updateInternalState()
+ updateInternalState(rpId, executorId, container)
} catch {
case e: Throwable =>
getOrUpdateNumExecutorsStartingForRPId(rpId).decrementAndGet()
Review Comment:
you need to handle if launching throws and remove it from
launchingExecutorContainerIds
##########
resource-managers/yarn/src/main/scala/org/apache/spark/deploy/yarn/YarnAllocator.scala:
##########
@@ -806,11 +797,31 @@ private[yarn] class YarnAllocator(
}
}
+ private def updateInternalState(rpId: Int, executorId: String,
+ container: Container): Unit = synchronized {
Review Comment:
nit indentation should be 4 spaces here.
##########
resource-managers/yarn/src/main/scala/org/apache/spark/deploy/yarn/YarnAllocator.scala:
##########
@@ -806,11 +797,31 @@ private[yarn] class YarnAllocator(
}
}
+ private def updateInternalState(rpId: Int, executorId: String,
+ container: Container): Unit = synchronized {
+ val containerId = container.getId
+ if (launchingExecutorContainerIds.contains(containerId)) {
+ getOrUpdateRunningExecutorForRPId(rpId).add(executorId)
+ getOrUpdateNumExecutorsStartingForRPId(rpId).decrementAndGet()
Review Comment:
getOrUpdateNumExecutorsStartingForRPId still needs to be decremented
somewhere, otherwise it leaks that container and thinks its still starting
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]