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

Ringbuffer - head and tail out of sync #10774

hos-p opened this issue Jun 16, 2017 · 2 comments

Ringbuffer - head and tail out of sync #10774

hos-p opened this issue Jun 16, 2017 · 2 comments


Copy link

@hos-p hos-p commented Jun 16, 2017

Hi, I am running hazelcast (3.8.2) on 3 servers and using ringbuffer for storing data. Ringbuffer has capacity 500 and no backup.

I am using addAllAsync(dataCollection, OverflowPolicy.OVERWRITE) for storing data in just 1 thread in whole cluster. This thread calls this method one times per second and stores collection with up to 500 entries.

Reading is performed by more threads in parallel using readManyAsync() method.

And sometimes after node outage get headSequence and tailSequence out of sync as you can see on attached image.

And it seems that version 3.7.8 does not have this problem.


Copy link

@hos-p hos-p commented Jun 19, 2017

I have tried to write some example simulating this issue.

You can find 3 main classes in attached maven project.

  1. Writer
  2. Reader1
  3. Reader2

Execute all of them. Wait some time and stop/start Reader2 several times. All three classes have implemented check of ringbuffer size which throws RuntimeException if this issue happens.

Copy link

@mdogan mdogan commented Jun 19, 2017

Thanks for the reproducer.

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

Successfully merging a pull request may close this issue.

3 participants
You can’t perform that action at this time.