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

service: Update reserve_session to roll back on error #401

Merged
merged 1 commit into from
Sep 25, 2023

Conversation

bkeryan
Copy link
Collaborator

@bkeryan bkeryan commented Sep 22, 2023

What does this Pull Request accomplish?

Update SessionManagementClient.reserve_session to roll back the reservation when raising a "Too many sessions reserved" error.

I don't think it's necessary to roll back the "No sessions reserved" case because the session management server's unreserve method would loop over an empty list.

Why should this Pull Request be merged?

Fixes #400

What testing has been done?

Ran new acceptance test (part of separate PR)

@github-actions
Copy link

Test Results

     12 files  ±0       12 suites  ±0   2m 15s ⏱️ -2s
   215 tests ±0     186 ✔️ ±0    29 💤 ±0  0 ±0 
2 568 runs  ±0  2 220 ✔️ ±0  348 💤 ±0  0 ±0 

Results for commit f5d6858. ± Comparison against base commit 9bffe48.

@bkeryan bkeryan merged commit 761140f into main Sep 25, 2023
@bkeryan bkeryan deleted the users/bkeryan/reserve-session-rollback branch September 25, 2023 14:12
bkeryan added a commit that referenced this pull request Sep 25, 2023
bkeryan added a commit that referenced this pull request Sep 25, 2023
…401) (#409)

service: Update reserve_session to roll back on error (#401)

(cherry picked from commit 761140f)
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.

reserve_session() leaves sessions reserved when raising a "Too many sessions reserved" exception
4 participants