You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
pq: reduce read contention when caught up (#17765) (#17790)
* pq: reduce read contention when caught up
By keeping track of the lock-holding reader's demand (a quantity of events and
a deadline), we can avoid waking up the reader for each event that is written
to the queue, significantly reducing the time that the lock-holding _writer_
is blocked by synchronous read operations. The lock-holding reader is awoken
when its demand is met, has expired, or when the writer has rotated pages.
| batch size | unpatched | this patch |
| ---------- | --------- | ---------- |
| 125 | 260k | 498k |
| 2000 | 219k | 516k |
* remove superfluous volatile flag
(cherry picked from commit ddd519c)
Co-authored-by: Rye Biesemeyer <[email protected]>
0 commit comments