-
Notifications
You must be signed in to change notification settings - Fork 71
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
Read-only transaction processing - prevent thread starvation while in the read window. #822
Comments
This was referenced Mar 17, 2023
greg7mdp
added a commit
that referenced
this issue
Mar 20, 2023
greg7mdp
added a commit
that referenced
this issue
Mar 21, 2023
greg7mdp
added a commit
that referenced
this issue
Mar 21, 2023
heifner
added a commit
that referenced
this issue
Mar 22, 2023
greg7mdp
added a commit
that referenced
this issue
Mar 22, 2023
greg7mdp
added a commit
that referenced
this issue
Mar 23, 2023
greg7mdp
added a commit
that referenced
this issue
Mar 24, 2023
greg7mdp
added a commit
that referenced
this issue
Mar 24, 2023
greg7mdp
added a commit
that referenced
this issue
Mar 24, 2023
greg7mdp
added a commit
that referenced
this issue
Mar 27, 2023
[4.0] Cleanup and prevent thread starvation while in the read window.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is an issue related to the processing of read-only transactions in parallel during the read window.
When starting the read window, a task is posted for each thread in the ro thread pool (
_ro_thread_pool
), and this task has a loop doing approximately:The issue is that, if for example we have only one ro trx in the queue when we enter the read window, the first thread will start executing this transaction, and all the other tasks will exit, leaving a single task to execute all further read transactions which may be posted while the read window is still active.
So essentially, for the remainder of the read window we would effectively execute readonly transactions on a single thread.
Instead of exiting the task, if there are other threads currently executing ro transactions, and there is time left in the read window, we should probably wait on a condition variable associated to the queue (
_ro_trx_queue
) instead of exiting the loop.This will require changes to
_ro_trx_queue
. In addition encapsulate queue lock/unlock by adding a push/pop members to_ro_trx_queue
.The text was updated successfully, but these errors were encountered: