Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Loading