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

Improve efficiency of locking tasks when doing assignment #118

Open
cash opened this issue Feb 17, 2021 · 0 comments
Open

Improve efficiency of locking tasks when doing assignment #118

cash opened this issue Feb 17, 2021 · 0 comments

Comments

@cash
Copy link
Member

cash commented Feb 17, 2021

See comment on #117

The functions of interest are accept_next_task() and _skip_aware_next_available_task_id().

The flow is

  1. lock all tasks that the user has access to
  2. retrieve first task that the user has access to and is not in the skipped list

_skip_aware_next_available_task_id() is also used in preview_next_task() which does not lock.

One option is to move the lock into _skip_aware_next_available_task_id(). Because preview_next_task() is not done in a transaction, the lock won't occur. It will for accept_next_task() and it can be done to only lock one row instead of all the rows.

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

No branches or pull requests

1 participant