Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Performance Issue: QueueStore.loadAll() is called way too often when draining Items from Queue #10621
Hazelcast Version: 3.8.1
We are using hazelcast queues in combination with persistence using a QueueStore implementation.
I wrote a simple test project to demonstrate the issue: https://github.com/GustavGans81/hazelcastbugdemo
The unit test BugTest.drainToTest() configures a hazelcast queue with bulk-load 4.
When running the test I would expect two calls to loadAll() each loading a bulk of 4 different elements resulting in a log output like this:
Instead it results in this output:
This means loadAll is called once for the first bulk and then called again for every other single element that has to be loaded.
Our temporary workaround is to use the exact same size for bulk-load and maxEntries parameters, causing only one bulk to be loaded on every drainTo() call.