Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: cancelling session from sessions service cancel tasks and abort …
…results from the session (#789) # Motivation Previously, cancelling a session from sessions service was only updating the session status, leaving all its submitted and running tasks in autoscaling count. This PR removes tasks of a cancelled session from the autoscaling count by cancelling of the tasks and results from the session. # Description When calling the Cancel RPC from the session service, we also change task and results statuses in the cancelled session. # Testing On an ArmoniK instance, this new implementation was used and confirmed to change the statuses. # Impact - It will reduce the computing resources consummed because the submitted tasks from a cancelled session will change status to cancelling and not count for autoscaling. - If previously cancelling tasks are not removed from the queue during downscaling, when a new session is submitted and upscaling occurs, cancelling tasks will be removed first from the queue storage before new tasks will be processed (at equal priority). # Checklist - [x] My code adheres to the coding and style guidelines of the project. - [x] I have performed a self-review of my code. - [ ] I have commented my code, particularly in hard-to-understand areas. - [ ] I have made corresponding changes to the documentation. - [x] I have thoroughly tested my modifications and added tests when necessary. - [x] Tests pass locally and in the CI. - [x] I have assessed the performance impact of my modifications.
- Loading branch information