-
Notifications
You must be signed in to change notification settings - Fork 21
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
Make concurrent session requests more robust #902
Labels
Comments
nphilipp
added
bug
database
concerning database models, migration, …
API
maintenance
labels
Aug 17, 2023
nphilipp
added a commit
to nphilipp/duffy
that referenced
this issue
Aug 24, 2023
- Return HTTP code 422 (unprocessable entity) if nodes are ultimately failed to be allocated for the new session. - Don’t retry subsequent database operations, as all involved objects (database rows) should now be exclusive to the current query. This makes the code much more readable. Instead, return appropriate HTTP codes on failures. - After the node allocation transaction is committed, consider all objects as stale to the session and reload when needed. Fixes: CentOS#902 Signed-off-by: Nils Philippsen <[email protected]>
nphilipp
added a commit
to nphilipp/duffy
that referenced
this issue
Aug 24, 2023
- Return HTTP code 422 (unprocessable entity) if nodes are ultimately failed to be allocated for the new session. - Don’t retry subsequent database operations, as all involved objects (database rows) should now be exclusive to the current query. This makes the code much more readable. Instead, return appropriate HTTP codes on failures. - After the node allocation transaction is committed, consider all objects as stale to the session and reload when needed. Fixes: CentOS#902 Signed-off-by: Nils Philippsen <[email protected]>
nphilipp
added a commit
to nphilipp/duffy
that referenced
this issue
Sep 6, 2023
- Return HTTP code 422 (unprocessable entity) if nodes are ultimately failed to be allocated for the new session. - Use (only) two separate transactions which get retried on DB conflicts. It is necessary to retry even the second transaction: even though the nodes used there are exclusive (allocated to the session in question), the query used to allocate nodes elsewhere can get their rows read, which can lead to conflicts. - Separate these transactions better by reloading all necessary objects from the database. - Return appropriate HTTP codes on failures. - Really unallocate nodes/delete the session on contextualization failures. Fixes: CentOS#902 Signed-off-by: Nils Philippsen <[email protected]>
nphilipp
added a commit
to nphilipp/duffy
that referenced
this issue
Sep 6, 2023
This adds indexes to a couple often-queried columns and advises the database to prefer index-based lookups instead of sequential scans. Related: CentOS#902 Signed-off-by: Nils Philippsen <[email protected]>
nphilipp
added a commit
to nphilipp/duffy
that referenced
this issue
Sep 6, 2023
- Return HTTP code 422 (unprocessable entity) if nodes are ultimately failed to be allocated for the new session. - Use (only) two separate transactions which get retried on DB conflicts. It is necessary to retry even the second transaction: even though the nodes used there are exclusive (allocated to the session in question), the query used to allocate nodes elsewhere can get their rows read, which can lead to conflicts. - Separate these transactions better by reloading all necessary objects from the database. - Return appropriate HTTP codes on failures. - Really unallocate nodes/delete the session on contextualization failures. Fixes: CentOS#902 Signed-off-by: Nils Philippsen <[email protected]>
nphilipp
added a commit
to nphilipp/duffy
that referenced
this issue
Sep 6, 2023
This adds indexes to a couple often-queried columns and advises the database to prefer index-based lookups instead of sequential scans. Related: CentOS#902 Signed-off-by: Nils Philippsen <[email protected]>
nphilipp
added a commit
that referenced
this issue
Sep 6, 2023
- Return HTTP code 422 (unprocessable entity) if nodes are ultimately failed to be allocated for the new session. - Use (only) two separate transactions which get retried on DB conflicts. It is necessary to retry even the second transaction: even though the nodes used there are exclusive (allocated to the session in question), the query used to allocate nodes elsewhere can get their rows read, which can lead to conflicts. - Separate these transactions better by reloading all necessary objects from the database. - Return appropriate HTTP codes on failures. - Really unallocate nodes/delete the session on contextualization failures. Fixes: #902 Signed-off-by: Nils Philippsen <[email protected]>
nphilipp
added a commit
that referenced
this issue
Sep 6, 2023
This adds indexes to a couple often-queried columns and advises the database to prefer index-based lookups instead of sequential scans. Related: #902 Signed-off-by: Nils Philippsen <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Stories
As a user of Duffy,
I want that requesting sessions/nodes is successful,
so I can conduct my tests.
As an operator of Duffy,
I want that processing nodes already assigned to a session (“contextualizing”) works reliably,
so that there no unused left over nodes which just cut into our cloud budget.
Acceptance Criteria
When a user requests a session…:
The text was updated successfully, but these errors were encountered: