anishshri-db commented on code in PR #53411:
URL: https://github.com/apache/spark/pull/53411#discussion_r2605109204


##########
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/state/StateStore.scala:
##########
@@ -1149,7 +1149,9 @@ object StateStore extends Logging {
         threadPool.shutdownNow() // Cancel currently executing tasks
 
         // Wait a while for tasks to respond to being cancelled
-        if (!threadPool.awaitTermination(60, TimeUnit.SECONDS)) {
+        // To avoid long test times, use minimum of timeout value or 60 seconds
+        if (!threadPool.awaitTermination(Math.min(60, shutdownTimeout),

Review Comment:
   If the timeout is set to be very low - lets say `1s`, we would now wait only 
for a total of `2s` before we can confirm the tpool shutdown. Should we really 
repurpose the timeout here ?



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

Reply via email to