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
New polling-strategy for Postgres, select-for-update based #175
Conversation
…e polling strategy
private final Scheduler scheduler; | ||
private final Execution pickedExecution; | ||
|
||
public ExecutePicked(Scheduler scheduler, Execution pickedExecution) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While working on this code, I faced some challenges in testing/following the code and updating due to the mutual dependency of Scheduler on the Execution and vice versa.
Could we have a more tree-like structure in a way that ExecutePicked gets "trigger"/"handler" interface instead of the scheduler itself?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, this a bit of technical debt I have not fixed yet. I do not like passing the full Scheduler
here. It should be changed to not reference Scheduler
.. haven't taken the time to figure out a good solution yet..
3d629ed
to
45fa593
Compare
New
SchedulerBuilder
methods:pollUsingFetchAndLockOnExecute(double lowerLimitFractionOfThreads, double executionsPerBatchFractionOfThreads)
. The old default, but more customizable.pollUsingLockAndFetch(double lowerLimitFractionOfThreads, double upperLimitFractionOfThreads)
a new method of polling based onSELECT FOR UPDATE .. SKIP LOCKED RETURNING ...
. Currently implemented for PostgresBenchmarks results comparing the default mechanism
fetch
to the newlock-and-fetch
:Relevant reading material