-
Notifications
You must be signed in to change notification settings - Fork 556
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
Mpmc xadd q poll can use consumerIndex parity bit to mark a rotation #265
Comments
The changes of #281 have shown the need to simplify the mpmc xadd poll. To summarize the findings for the future:
The issue happen because a rotation can change ci to point to a new chunk (!= The fix on the PR is valid for the |
mpmc xadd's poll uses the consumer index to move forward the consumers, but consumers that need to recognize that a rotation is in progress have to check consumerBuffer::index value.
The rotation in progress case can be handled more transpanrently by stealing the parity bit of consumerIndex, saving to read the
consumerBuffer
(and its index) field if not necessary.The text was updated successfully, but these errors were encountered: