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

Reduce likelihood of contention in transactions #814

Open
BenjaminPelletier opened this issue Sep 21, 2022 · 0 comments
Open

Reduce likelihood of contention in transactions #814

BenjaminPelletier opened this issue Sep 21, 2022 · 0 comments
Labels
dss Relating to one of the DSS implementations feature Issue would improve software P2 Normal priority

Comments

@BenjaminPelletier
Copy link
Member

Currently, there are circumstances when many transactions may fundamentally contend to change the same data fields. Specifically, if there are many flights being updated in the same area at the same time, the notification indices for each flight's associated subscription will need to be updated for each change to a flight in the area. We can reduce the likelihood of a deadlock or poor database behavior in two ways:

  1. Always sort ID parameters before passing them in a SQL command since they will be evaluated in series rather than parallel
  2. Add a "for update" flag when reading database entities to use a SELECT FOR UPDATE SQL command where appropriate
@BenjaminPelletier BenjaminPelletier added P2 Normal priority feature Issue would improve software dss Relating to one of the DSS implementations labels Sep 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dss Relating to one of the DSS implementations feature Issue would improve software P2 Normal priority
Projects
None yet
Development

No branches or pull requests

1 participant