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

Actions with no listeners that are old should be removed from queue #338

Open
allada opened this issue Oct 25, 2023 · 3 comments · May be fixed by #778
Open

Actions with no listeners that are old should be removed from queue #338

allada opened this issue Oct 25, 2023 · 3 comments · May be fixed by #778
Assignees

Comments

@allada
Copy link
Collaborator

allada commented Oct 25, 2023

If an action is old (set in config) and has no more listeners it should just be evicted from the queue, since no one is waiting for the action.

see: https://github.com/TraceMachina/turbo-cache/blob/f15146d0cf94e1a9159f14db775efe4a3e27355d/cas/scheduler/simple_scheduler.rs#L432

We should implement this using timeouts and upon timing out signal to the worker to kill the action.

@adam-singer adam-singer self-assigned this Dec 8, 2023
@zbirenbaum
Copy link
Contributor

What exactly qualifies an action as old?

It doesn't make much sense to me to compare the timeout for an action with time elapsed since creation, so I think it has to be one of the following:

  1. time the worker has spent trying to complete the task (would have to be a new field I think)
  2. time since the action was loaded from CAS

@allada
Copy link
Collaborator Author

allada commented Mar 2, 2024

In this case, I think it should track how long the item has been in the queue with no clients waiting on it. Then based on the config we drop or terminate the job after X number of seconds.

@zbirenbaum
Copy link
Contributor

In this case, I think it should track how long the item has been in the queue with no clients waiting on it. Then based on the config we drop or terminate the job after X number of seconds.

Got it, thanks for the clarification!

@zbirenbaum zbirenbaum mentioned this issue Mar 4, 2024
2 tasks
zbirenbaum pushed a commit to zbirenbaum/nativelink that referenced this issue Mar 19, 2024
Implement scheduler side removal of actions with no listeners. Adds
disconnect_timeout_s configuration field with default of 60s. If the
client waiting on a given action is disconnected for longer than this
duration without reconnecting the scheduler will stop tracking it. This
does not remove it from the worker if the job has already been
dispatched.

fixes TraceMachina#338
zbirenbaum pushed a commit to zbirenbaum/nativelink that referenced this issue Mar 19, 2024
Implement scheduler side removal of actions with no listeners. Adds
disconnect_timeout_s configuration field with default of 60s. If the
client waiting on a given action is disconnected for longer than this
duration without reconnecting the scheduler will stop tracking it. This
does not remove it from the worker if the job has already been
dispatched.

fixes TraceMachina#338
@zbirenbaum zbirenbaum linked a pull request Mar 19, 2024 that will close this issue
5 tasks
zbirenbaum pushed a commit to zbirenbaum/nativelink that referenced this issue Mar 19, 2024
Implement scheduler side removal of actions with no listeners. Adds
disconnect_timeout_s configuration field with default of 60s. If the
client waiting on a given action is disconnected for longer than this
duration without reconnecting the scheduler will stop tracking it. This
does not remove it from the worker if the job has already been
dispatched.

fixes TraceMachina#338
zbirenbaum pushed a commit to zbirenbaum/nativelink that referenced this issue Mar 19, 2024
Implement scheduler side removal of actions with no listeners. Adds
disconnect_timeout_s configuration field with default of 60s. If the
client waiting on a given action is disconnected for longer than this
duration without reconnecting the scheduler will stop tracking it. This
does not remove it from the worker if the job has already been
dispatched.

fixes TraceMachina#338
zbirenbaum pushed a commit to zbirenbaum/nativelink that referenced this issue Apr 4, 2024
Implement scheduler side removal of actions with no listeners. Adds
disconnect_timeout_s configuration field with default of 60s. If the
client waiting on a given action is disconnected for longer than this
duration without reconnecting the scheduler will stop tracking it. This
does not remove it from the worker if the job has already been
dispatched.

fixes TraceMachina#338
zbirenbaum pushed a commit to zbirenbaum/nativelink that referenced this issue Apr 4, 2024
Implement scheduler side removal of actions with no listeners. Adds
disconnect_timeout_s configuration field with default of 60s. If the
client waiting on a given action is disconnected for longer than this
duration without reconnecting the scheduler will stop tracking it. This
does not remove it from the worker if the job has already been
dispatched.

fixes TraceMachina#338
zbirenbaum pushed a commit to zbirenbaum/nativelink that referenced this issue Apr 4, 2024
Implement scheduler side removal of actions with no listeners. Adds
disconnect_timeout_s configuration field with default of 60s. If the
client waiting on a given action is disconnected for longer than this
duration without reconnecting the scheduler will stop tracking it. This
does not remove it from the worker if the job has already been
dispatched.

fixes TraceMachina#338
zbirenbaum pushed a commit to zbirenbaum/nativelink that referenced this issue Apr 4, 2024
Implement scheduler side removal of actions with no listeners. Adds
disconnect_timeout_s configuration field with default of 60s. If the
client waiting on a given action is disconnected for longer than this
duration without reconnecting the scheduler will stop tracking it. This
does not remove it from the worker if the job has already been
dispatched.

fixes TraceMachina#338
zbirenbaum pushed a commit to zbirenbaum/nativelink that referenced this issue Apr 4, 2024
Implement scheduler side removal of actions with no listeners. Adds
disconnect_timeout_s configuration field with default of 60s. If the
client waiting on a given action is disconnected for longer than this
duration without reconnecting the scheduler will stop tracking it. This
does not remove it from the worker if the job has already been
dispatched.

fixes TraceMachina#338
zbirenbaum pushed a commit to zbirenbaum/nativelink that referenced this issue Apr 4, 2024
Implement scheduler side removal of actions with no listeners. Adds
disconnect_timeout_s configuration field with default of 60s. If the
client waiting on a given action is disconnected for longer than this
duration without reconnecting the scheduler will stop tracking it. This
does not remove it from the worker if the job has already been
dispatched.

fixes TraceMachina#338
zbirenbaum pushed a commit to zbirenbaum/nativelink that referenced this issue Apr 5, 2024
Implements worker api for requesting a currently running action to be
killed. Allows for action cancellation requests to be sent from the
scheduler during scenarios such as client disconnection.

towards TraceMachina#338
zbirenbaum pushed a commit to zbirenbaum/nativelink that referenced this issue Apr 5, 2024
Implements scheduler api for requesting a currently running action to be
killed. Allows for action cancellation requests to be sent from the
scheduler during scenarios such as client disconnection.

towards TraceMachina#338
zbirenbaum pushed a commit to zbirenbaum/nativelink that referenced this issue Apr 5, 2024
Implements worker api for requesting a currently running action to be
killed. Allows for action cancellation requests to be received by the
worker.

towards TraceMachina#338
zbirenbaum pushed a commit to zbirenbaum/nativelink that referenced this issue Apr 5, 2024
Implements scheduler api for requesting a currently running action to be
killed. Allows for action cancellation requests to be sent from the
scheduler during scenarios such as client disconnection.

towards TraceMachina#338
zbirenbaum pushed a commit to zbirenbaum/nativelink that referenced this issue Apr 5, 2024
Implements worker api for requesting a currently running action to be
killed. Allows for action cancellation requests to be sent from the
scheduler during scenarios such as client disconnection.

towards TraceMachina#338
zbirenbaum pushed a commit to zbirenbaum/nativelink that referenced this issue Apr 5, 2024
Implement scheduler side removal of actions with no listeners. Adds
disconnect_timeout_s configuration field with default of 60s. If the
client waiting on a given action is disconnected for longer than this
duration without reconnecting the scheduler will stop tracking it. This
does not remove it from the worker if the job has already been
dispatched.

fixes TraceMachina#338
zbirenbaum pushed a commit to zbirenbaum/nativelink that referenced this issue Apr 5, 2024
Implements worker api for requesting a currently running action to be
killed. Allows for action cancellation requests to be sent from the
scheduler during scenarios such as client disconnection.

towards TraceMachina#338
zbirenbaum pushed a commit to zbirenbaum/nativelink that referenced this issue Apr 5, 2024
Implements worker api for requesting a currently running action to be
killed. Allows for action cancellation requests to be sent from the
scheduler during scenarios such as client disconnection.

towards TraceMachina#338
zbirenbaum pushed a commit to zbirenbaum/nativelink that referenced this issue Apr 5, 2024
Implements worker api for requesting a currently running action to be
killed. Allows for action cancellation requests to be sent from the
scheduler during scenarios such as client disconnection.

towards TraceMachina#338
zbirenbaum pushed a commit to zbirenbaum/nativelink that referenced this issue Apr 5, 2024
Implements worker api for requesting a currently running action to be
killed. Allows for action cancellation requests to be sent from the
scheduler during scenarios such as client disconnection.

towards TraceMachina#338
zbirenbaum pushed a commit to zbirenbaum/nativelink that referenced this issue Apr 5, 2024
Implements worker api for requesting a currently running action to be
killed. Allows for action cancellation requests to be sent from the
scheduler during scenarios such as client disconnection.

towards TraceMachina#338
zbirenbaum pushed a commit to zbirenbaum/nativelink that referenced this issue Apr 6, 2024
Adds methods to send a request from the scheduler to a worker for
a running action to be killed. Allows for action cancellation
requests to be sent from the scheduler during scenarios such
as client disconnection.

towards TraceMachina#338
zbirenbaum pushed a commit to zbirenbaum/nativelink that referenced this issue Apr 6, 2024
Implements worker api for requesting a currently running action to be
killed. Allows for action cancellation requests to be sent from the
scheduler during scenarios such as client disconnection.

towards TraceMachina#338
zbirenbaum pushed a commit to zbirenbaum/nativelink that referenced this issue Apr 6, 2024
Adds methods to send a request from the scheduler to a worker for
a running action to be killed. Allows for action cancellation
requests to be sent from the scheduler during scenarios such
as client disconnection.

towards TraceMachina#338
zbirenbaum pushed a commit to zbirenbaum/nativelink that referenced this issue Apr 6, 2024
Adds methods to send a request from the scheduler to a worker for
a running action to be killed. Allows for action cancellation
requests to be sent from the scheduler during scenarios such
as client disconnection.

towards TraceMachina#338
zbirenbaum pushed a commit to zbirenbaum/nativelink that referenced this issue Apr 7, 2024
Adds methods to send a request from the scheduler to a worker for
a running action to be killed. Allows for action cancellation
requests to be sent from the scheduler during scenarios such
as client disconnection.

towards TraceMachina#338
zbirenbaum pushed a commit to zbirenbaum/nativelink that referenced this issue Apr 7, 2024
Adds methods to send a request from the scheduler to a worker for
a running action to be killed. Allows for action cancellation
requests to be sent from the scheduler during scenarios such
as client disconnection.

towards TraceMachina#338
zbirenbaum pushed a commit to zbirenbaum/nativelink that referenced this issue Apr 7, 2024
Adds methods to send a request from the scheduler to a worker for
a running action to be killed. Allows for action cancellation
requests to be sent from the scheduler during scenarios such
as client disconnection.

towards TraceMachina#338
zbirenbaum pushed a commit to zbirenbaum/nativelink that referenced this issue Apr 7, 2024
Implements worker api for requesting a currently running action to be
killed. Allows for action cancellation requests to be sent from the
scheduler during scenarios such as client disconnection.

towards TraceMachina#338
zbirenbaum pushed a commit to zbirenbaum/nativelink that referenced this issue Apr 7, 2024
Implements worker api for requesting a currently running action to be
killed. Allows for action cancellation requests to be sent from the
scheduler during scenarios such as client disconnection.

towards TraceMachina#338
zbirenbaum pushed a commit to zbirenbaum/nativelink that referenced this issue Apr 8, 2024
Implements worker api for requesting a currently running action to be
killed. Allows for action cancellation requests to be sent from the
scheduler during scenarios such as client disconnection.

towards TraceMachina#338
zbirenbaum pushed a commit to zbirenbaum/nativelink that referenced this issue Apr 8, 2024
Implements worker api for requesting a currently running action to be
killed. Allows for action cancellation requests to be sent from the
scheduler during scenarios such as client disconnection.

towards TraceMachina#338
zbirenbaum added a commit that referenced this issue Apr 8, 2024
Implements worker api for requesting a currently running action to be
killed. Allows for action cancellation requests to be sent from the
scheduler during scenarios such as client disconnection.

towards #338

Co-Authored-By: Zach Birenbaum <[email protected]>
zbirenbaum pushed a commit to zbirenbaum/nativelink that referenced this issue Apr 8, 2024
Implements scheduler api for sending a kill action request to a worker.
Allows for action cancellation during scenarios such as client
disconnection.

towards TraceMachina#338
zbirenbaum pushed a commit to zbirenbaum/nativelink that referenced this issue Apr 8, 2024
Implements scheduler api for sending a kill action request to a worker.
Allows for action cancellation during scenarios such as client
disconnection.

towards TraceMachina#338
zbirenbaum pushed a commit to zbirenbaum/nativelink that referenced this issue Apr 8, 2024
Implements scheduler api for sending a kill action request to a worker.
Allows for action cancellation during scenarios such as client
disconnection.

towards TraceMachina#338
zbirenbaum pushed a commit to zbirenbaum/nativelink that referenced this issue Apr 10, 2024
Implement scheduler side removal of actions with no listeners. Adds
disconnect_timeout_s configuration field with default of 60s. If the
client waiting on a given action is disconnected for longer than this
duration without reconnecting the scheduler will stop tracking it. This
does not remove it from the worker if the job has already been
dispatched.

fixes TraceMachina#338
zbirenbaum pushed a commit to zbirenbaum/nativelink that referenced this issue Apr 10, 2024
Implement scheduler side removal of actions with no listeners. Adds
disconnect_timeout_s configuration field with default of 60s. If the
client waiting on a given action is disconnected for longer than this
duration without reconnecting the scheduler will stop tracking it. This
does not remove it from the worker if the job has already been
dispatched.

fixes TraceMachina#338
zbirenbaum pushed a commit to zbirenbaum/nativelink that referenced this issue Apr 10, 2024
Implement scheduler side removal of actions with no listeners. Adds
disconnect_timeout_s configuration field with default of 60s. If the
client waiting on a given action is disconnected for longer than this
duration without reconnecting the scheduler will stop tracking it. This
does not remove it from the worker if the job has already been
dispatched.

fixes TraceMachina#338
zbirenbaum pushed a commit to zbirenbaum/nativelink that referenced this issue Apr 10, 2024
Implement scheduler side removal of actions with no listeners. Adds
disconnect_timeout_s configuration field with default of 60s. If the
client waiting on a given action is disconnected for longer than this
duration without reconnecting the scheduler will stop tracking it. This
does not remove it from the worker if the job has already been
dispatched.

fixes TraceMachina#338
zbirenbaum pushed a commit to zbirenbaum/nativelink that referenced this issue Apr 15, 2024
Implement scheduler side removal of actions with no listeners. Adds
disconnect_timeout_s configuration field with default of 60s. If the
client waiting on a given action is disconnected for longer than this
duration without reconnecting the scheduler will stop tracking it. This
does not remove it from the worker if the job has already been
dispatched.

fixes TraceMachina#338
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants