Why do I see the warning ‘WARNING (sindex): (thr_query.c:1072) QTR Put in hash failed with error -4’?
There are 2 known reasons for the above warning to be seen on Aerospike server. On the client side, you should see a error code 215 (AS_PROTO_RESULT_FAIL_QUERY_DUPLICATE). The error points towards a duplicate query being executed on Aerospike server.
This error could happen when there are multiple incoming queries with same Task ID, basically if a unique TaskID is not set when running the same query on multiple threads. Check whether you are setting the Task ID on the client for the queries. The Task ID is set by using the following APIs: setTaskID for Java and SetTaskID for C#.
This error could happen if there are retries enabled for secondary index query jobs. It is not recommend to have retries for secondary index queries (or scans) to avoid them being run for the same Job ID which results in the warning.