Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Ringbuffer - head and tail out of sync #10774
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.
I have tried to write some example simulating this issue.
You can find 3 main classes in attached maven project.
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.