-
Notifications
You must be signed in to change notification settings - Fork 84
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
Array ring buffer wastes capacity #320
Comments
Hello, @franz1981. We've also included it on ISPN recently (infinispan/infinispan#13016). I think Will has also added a few modifications. |
Nice one, but the issue is valid? I have read it on the phone since today I couldn't use the computer, so I could be very wrong |
Yeah, I implemented this in our version of the ArrayRingBuffer as I didn't want to deal with the empty space. Check the catchUpHeadPointer method on the PR above. Maybe there is a more efficient way of doing it, instead of having the while loop, but it seems to work as it is. |
@wburns let me know if it can be of any help and thanks for infinispan/infinispan#13016: has made my day, seeing this little one been used elsewhere ❤️ |
After eons I wanted to reuse this structure for http 2 stream handling in Netty and..
jgroups-raft/src/org/jgroups/raft/util/ArrayRingBuffer.java
Line 269 in a31940e
Doesn't seem to account for gaps 😕
i.e.
Remove should keep on checking bubbles of nulls to move the head as much as it can, till the tail, if necessary (or stopping at the first non null).
The text was updated successfully, but these errors were encountered: