Skip to content

Resumed tasks may not deallocate (or over-deallocate) resources #6915

@crusaderky

Description

@crusaderky

Use case

In jupyter notebook, a user starts a long-ish task. Then, they realise that it should have resources, so they resubmit it before the original task terminated.
Or the other way around, they submit a task with resources, realise they should have no or different resources, and resubmit.

Expected behaviour

After the original task terminates, available_resources == total_resources.

Actual behaviour

available_resources are released according to the second invocation of client.submit.
This could keep them occupied forever or send them above total_resources.

Reproducer

given available_resources = {"R": 1}, total_resources={"R": 1}:

f = client.submit(sleep, 2)
sleep(1)
f = client.submit(sleep, 2, resources={"R": 1})

Now we have available_resources = {"R": 2}, total_resources={"R": 1}.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions