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

Consider changing tail offset to be number of frame alignments #436

Open
mjpt777 opened this issue Nov 20, 2017 · 2 comments
Open

Consider changing tail offset to be number of frame alignments #436

mjpt777 opened this issue Nov 20, 2017 · 2 comments

Comments

@mjpt777
Copy link
Contributor

mjpt777 commented Nov 20, 2017

Rather than have the tail offset which is incremented on publication claim be the byte offset in the term it can be the number of frame alignments, currently 32-byte alignment, so that it gives a greater margin for error if many concurrent threads where to pass pass under the publication limit at exactly the same time to increment the tail and cause overflow.

For the publication to fail currently it would take 192 threads to be at the same point and term buffers to be 1GB length, with each claiming the maximum 16MB message length, for overflow to happen. Each division of the term length by 2 doubles the number of threads required for overflow at maximum message length.

@nitsanw
Copy link
Contributor

nitsanw commented Nov 20, 2017

Sounds a bit like compressed oops, based on a similar observation on alignment, and with a similar (minor) overhead of "uncompressing" the offset. Cool idea :)

@mjpt777
Copy link
Contributor Author

mjpt777 commented Nov 20, 2017

Credit should go to @goglusid for the observation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants