TomPlanche commented on issue #4287:
URL: https://github.com/apache/iggy/issues/4287#issuecomment-6180063725

   Problems 6 and 8 on master, after #4388, #4506 and #4507:
   
   - Problem 6: a sweep in flight now stops at its next check, but 
`disconnect()` does not wait for it. I measured it on TCP with a 3 s retry 
interval: `disconnect()` returns after 3 ms, the state stays `Connecting`, and 
the sweep stops only when its pause ends, 2.8 s later. A `connect()` after the 
`disconnect()` also waits for that pause. With the default `reestablish_after` 
of 5 s, this wait can be 5 s long.
   - Problem 8: the QUIC `disconnect()` waits in `endpoint.wait_idle()`, and 
the sweep can still dial during that wait.
   
   Proposal for one PR on TCP, QUIC and WebSocket: the sweep waits out its 
pauses in a `select!` with a `Notify` that `disconnect()` and `shutdown()` 
trigger. `disconnect()` then waits until the sweep stops, before it closes the 
connection. Thus no sweep runs when `disconnect()` returns, the state is 
`Disconnected`, and no dial can start during `wait_idle()`. Is that OK?
   


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

Reply via email to