You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "antban (via GitHub)" <gi...@apache.org> on 2025/06/10 16:24:43 UTC
[PR] Put a patch on bleeding eyes [spark]
antban opened a new pull request, #51142:
URL: https://github.com/apache/spark/pull/51142
(no comment)
--
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-unsubscribe@spark.apache.org
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
Re: [PR] Put a patch on bleeding eyes [spark]
Posted by "antban (via GitHub)" <gi...@apache.org>.
antban commented on code in PR #51142:
URL: https://github.com/apache/spark/pull/51142#discussion_r2138345041
##########
core/src/main/scala/org/apache/spark/api/python/PythonWorkerFactory.scala:
##########
@@ -414,19 +413,27 @@ private[spark] class PythonWorkerFactory(
override def run(): Unit = {
while (true) {
self.synchronized {
- if (IDLE_WORKER_TIMEOUT_NS < System.nanoTime() - lastActivityNs) {
- cleanupIdleWorkers()
- lastActivityNs = System.nanoTime()
+ if (idleWorkers.isEmpty) {
+ self.wait()
+ } else {
+ val (_, idleAt) = idleWorkers.front
+ val curNanos = System.nanoTime
+ if ((idleAt + IDLE_WORKER_TIMEOUT_NS) >= curNanos) {
+ cleanupOneIdle();
Review Comment:
```suggestion
stopWorkerInternal(worker);
```
##########
core/src/main/scala/org/apache/spark/api/python/PythonWorkerFactory.scala:
##########
@@ -414,19 +413,27 @@ private[spark] class PythonWorkerFactory(
override def run(): Unit = {
while (true) {
self.synchronized {
- if (IDLE_WORKER_TIMEOUT_NS < System.nanoTime() - lastActivityNs) {
- cleanupIdleWorkers()
- lastActivityNs = System.nanoTime()
+ if (idleWorkers.isEmpty) {
+ self.wait()
+ } else {
+ val (_, idleAt) = idleWorkers.front
Review Comment:
```suggestion
val (worker, idleAt) = idleWorkers.front
```
--
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-unsubscribe@spark.apache.org
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
Re: [PR] Put a patch on bleeding eyes [spark]
Posted by "antban (via GitHub)" <gi...@apache.org>.
antban closed pull request #51142: Put a patch on bleeding eyes
URL: https://github.com/apache/spark/pull/51142
--
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-unsubscribe@spark.apache.org
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
Re: [PR] Put a patch on bleeding eyes [spark]
Posted by "antban (via GitHub)" <gi...@apache.org>.
antban commented on code in PR #51142:
URL: https://github.com/apache/spark/pull/51142#discussion_r2138330521
##########
core/src/main/scala/org/apache/spark/api/python/PythonWorkerFactory.scala:
##########
@@ -414,19 +413,28 @@ private[spark] class PythonWorkerFactory(
override def run(): Unit = {
while (true) {
self.synchronized {
- if (IDLE_WORKER_TIMEOUT_NS < System.nanoTime() - lastActivityNs) {
- cleanupIdleWorkers()
- lastActivityNs = System.nanoTime()
+ if (idleWorkers.isEmpty) {
+ self.wait()
+ }
+ if (idleWorkers.nonEmpty) {
Review Comment:
```suggestion
} else {
```
--
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-unsubscribe@spark.apache.org
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