Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a timeout option to htex command client #3441

Merged
merged 7 commits into from
May 27, 2024

Conversation

benclifford
Copy link
Collaborator

@benclifford benclifford commented May 17, 2024

This is in preparation in an upcoming PR for replacing the current multiprocessing.Queue based report of interchange ports (which has a 120s timeout) with a command client based retrieval of that information (so now the command client needs to implement a 120s timeout to closely replicate that behaviour). That work is itself part of using fork/exec to launch the interchange, rather than multiprocessing.fork (issue #3373)

When the command client timeouts after sending a command, then it sets itself to permanently bad: this is because the state of the channel is now unknown. eg. Should the next action be to receive a response from a previously timed out command that was eventually executed? Should the channel be recreated assuming a previously sent command was never sent?

Tagging issue #3376 (command client is not thread safe) because I feel like reworking this timeout behaviour and reworking that thread safety might be a single piece of deeper work.

Changed Behaviour

Timeout functionality is unused at the moment, so this shouldn't change things.

Type of change

  • New feature

This is in preparation in an upcoming PR for replacing the current
multiprocessing.Queue based report of interchange ports (which has a 120s
timeout) with a command client based retrieval of that information
(so now the command client needs to implement a 120s timeout to closely
replicate that behaviour). That work is itself part of using fork/exec to
launch the interchange, rather than multiprocessing.fork (issue #3373)

When the command client timeouts after sending a command, then it sets itself
to permanently bad: this is because the state of the channel is now unknown.
eg. Should the next action be to receive a response from a previously timed out
command that was eventually executed? Should the channel be recreated assuming
a previously sent command was never sent?

Tagging issue #3376 (command client is not thread safe) because I feel like
reworking this timeout behaviour and reworking that thread safety might be a
single piece of deeper work.
@benclifford benclifford marked this pull request as draft May 17, 2024 15:27
@benclifford
Copy link
Collaborator Author

(needs a bit more testing with the no-timeout case, wups)

@benclifford benclifford marked this pull request as ready for review May 17, 2024 15:58
@benclifford benclifford requested a review from rjmello May 17, 2024 15:58
@benclifford
Copy link
Collaborator Author

tagging @rjmello for review because he most recently touched anything to do with zmq

@benclifford benclifford requested a review from yadudoc May 17, 2024 16:04
benclifford and others added 2 commits May 25, 2024 10:58
Co-authored-by: rjmello <30907815+rjmello@users.noreply.github.com>
Co-authored-by: rjmello <30907815+rjmello@users.noreply.github.com>
@benclifford benclifford requested a review from rjmello May 25, 2024 11:10
Copy link
Member

@rjmello rjmello left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎸

@benclifford benclifford merged commit 5a9c1cb into master May 27, 2024
6 checks passed
@benclifford benclifford deleted the benc-interchange-command-timeout branch May 27, 2024 08:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants