Failures for the same key when accessed concurrently (transaction-pending-limit)

by young » Sun Nov 11, 2012 11:02 pm

When many threads try to concurrently access (read/write operations) the same key, there may be some failures. This is due to the configuration “transaction-pending-limit”. The server’s transaction queue will include reads/writes coming from all threads to that server. This value will be set in the main Aerospike configuration file on each node (/etc/citrusleaf/citrusleaf.conf) in the “service” area:

service {
    ...
    transaction-pending-limit 3
    ...
}

e.g. If the “transaction-pending-limit” is 9 and there are 5 reads and 5 writes for the same key in the queue, then “transaction-pending-limit” is considered exceeded and any other operations on that key will fail.

The default is 3. Increase this configuration to accommodate the behavior of your application. The stats variable that tracks these failures is “err_rw_pending_limit”. If you set “transaction-pending-limit” to zero, the transaction queue check is not performed. Setting “transaction-pending-limit” to “0” is not recommended.