Why do I see the warning "QTR Put in hash failed with error -4"?

The Aerospike Knowledge Base has moved to https://support.aerospike.com. Content on https://discuss.aerospike.com is being migrated to either https://support.aerospike.com or https://docs.aerospike.com. Maintenance on articles stored in this repository ceased on December 31st 2022 and this article may be stale. If you have any questions, please do not hesitate to raise a case via https://support.aerospike.com.

Why do I see the warning ‘WARNING (sindex): (thr_query.c:1072) QTR Put in hash failed with error -4’?

Explanation

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.

  1. 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#.

  2. 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.

Reference

Timestamp

July 2019