AlejandroMorgante commented on PR #60230:
URL: https://github.com/apache/spark/pull/60230#issuecomment-6743275004

     @nchammas 
     
     Thanks for the detailed review, this is really helpful.
   
     You're right on both implementation points:
     - Replaced `math.ceil()` with `max(1, int(timeout * 1000))`. Confirmed the 
floating-point issue you described (`2.007 * 1000` is `2007.0000000000002`, so 
`ceil()` was turning `2.007`s into `2008`ms) -- `max(1,
     int(...))` only changes values that would otherwise truncate to `0`.
     - Confirmed `awaitAnyTermination` doesn't need this at all, for exactly 
the reason you gave: its Connect handler delegates straight to the classic 
`StreamingQueryManager.awaitAnyTermination`, which has no
     positivity check and already returns immediately on `0`ms. Reverted that 
half of the change entirely, so this PR now only touches `awaitTermination`.
   
     Updated the tests, title, and description to match. Really appreciate you


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