I am using Aerospike Java Client (on Java 7) for Batch Get on Aerospike 3. Sometimes, batch get gets blocked, on taking thread dump, I get the following:
"Thread"Id=2837 in WAITING on lock=com.aerospike.client.command.BatchExecutor@7a4434d at java.lang.Object.wait(Native Method) at java.lang.Object.wait(Object.java:503) at com.aerospike.client.command.BatchExecutor.waitTillComplete(BatchExecutor.java:126) at com.aerospike.client.command.BatchExecutor.(BatchExecutor.java:80) at com.aerospike.client.AerospikeClient.get(AerospikeClient.java:474)
But no BatchThread is there in the thread dump, which means all BatchThread have ended but BatchExecutor is still waiting. It could be that boolean complete in BatchThread is not volatile, so due to instruction reordering complete = true is called after threadCompleted() in BatchThread. Or some other case could be there. Any help is appreciated.