This is an automated email from the ASF dual-hosted git repository.
gurwls223 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/master by this push:
new f96417fe0d37 [SPARK-47081][CONNECT][FOLLOW-UP] Respect
spark.connect.progress.reportInterval over timeout
f96417fe0d37 is described below
commit f96417fe0d37c665d331311fffae5ad27d8db4c2
Author: Hyukjin Kwon <[email protected]>
AuthorDate: Tue Jan 14 19:24:51 2025 +0900
[SPARK-47081][CONNECT][FOLLOW-UP] Respect
spark.connect.progress.reportInterval over timeout
### What changes were proposed in this pull request?
This PR is a followup of https://github.com/apache/spark/pull/49474 that
properly assigns the value to `timeout`.
### Why are the changes needed?
It was a mistake that did not assign the value back.
### Does this PR introduce _any_ user-facing change?
Yes, same as https://github.com/apache/spark/pull/49474
### How was this patch tested?
Manually.
### Was this patch authored or co-authored using generative AI tooling?
No
Closes #49484 from HyukjinKwon/SPARK-47081-followup4.
Authored-by: Hyukjin Kwon <[email protected]>
Signed-off-by: Hyukjin Kwon <[email protected]>
---
.../spark/sql/connect/execution/ExecuteGrpcResponseSender.scala | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git
a/sql/connect/server/src/main/scala/org/apache/spark/sql/connect/execution/ExecuteGrpcResponseSender.scala
b/sql/connect/server/src/main/scala/org/apache/spark/sql/connect/execution/ExecuteGrpcResponseSender.scala
index 72c2b0e3f109..21b5e057fb77 100644
---
a/sql/connect/server/src/main/scala/org/apache/spark/sql/connect/execution/ExecuteGrpcResponseSender.scala
+++
b/sql/connect/server/src/main/scala/org/apache/spark/sql/connect/execution/ExecuteGrpcResponseSender.scala
@@ -241,13 +241,13 @@ private[connect] class ExecuteGrpcResponseSender[T <:
Message](
// The state of interrupted, response and lastIndex are changed
under executionObserver
// monitor, and will notify upon state change.
if (response.isEmpty) {
- val timeout = Math.max(1, deadlineTimeMillis -
System.currentTimeMillis())
+ var timeout = Math.max(1, deadlineTimeMillis -
System.currentTimeMillis())
// Wake up more frequently to send the progress updates.
val progressTimeout =
executeHolder.sessionHolder.session.sessionState.conf
.getConf(CONNECT_PROGRESS_REPORT_INTERVAL)
// If the progress feature is disabled, wait for the deadline.
if (progressTimeout > 0L) {
- Math.min(progressTimeout, timeout)
+ timeout = Math.min(progressTimeout, timeout)
}
logTrace(s"Wait for response to become available with
timeout=$timeout ms.")
executionObserver.responseLock.wait(timeout)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]