andygrove opened a new issue, #2593:
URL: https://github.com/apache/datafusion-ballista/issues/2593

   **Describe the bug**
   
   The executor's scheduler connection retry loop never honours 
`scheduler_connect_timeout_seconds`. In 
[executor_process.rs#L655-L658](https://github.com/apache/datafusion-ballista/blob/ea1126c0649b2bc08e1e233b1972b64318821c16/ballista/executor/src/executor_process.rs#L655-L658):
   
   ```rust
   let start_time = Instant::now().elapsed().as_secs();
   // ...
       && Instant::now().elapsed().as_secs() - start_time < connect_timeout
   ```
   
   `Instant::now().elapsed()` measures the time since an `Instant` created on 
the same line, so both values are always ~0. The condition `0 - 0 < 
connect_timeout` is always true for any non-zero timeout, so the loop retries 
forever and the "timed out" error path is never reached.
   
   **To Reproduce**
   
   1. Start an executor with `--scheduler-connect-timeout-seconds 5` pointing 
at a scheduler address that is not listening.
   2. The executor keeps retrying indefinitely instead of exiting with a 
timeout error after ~5 seconds.
   
   **Expected behavior**
   
   The executor gives up and returns the timeout error once 
`scheduler_connect_timeout_seconds` has elapsed. For example:
   
   ```rust
   let start = Instant::now();
   // ...
       && start.elapsed() < Duration::from_secs(connect_timeout)
   ```
   
   A unit test for the timeout path would prevent a regression.
   
   **Additional context**
   
   The surrounding function, `start_executor_process_inner`, is tracked 
separately for refactoring; this bug fix is small and can land on its own first.
   
   Line references are pinned to commit ea1126c0649b.
   


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