Hi guys,
I came across tunable NUM_BATCH_THREADS for aerospike_batch_get
But I am not able to find any reference on how to use it. Could anyone please mention the detail page for NUM_BATCH_THREADS?
if (aerospike_batch_get(&as, &err, NULL, &batch, batch_read_cb, NULL)
!= AEROSPIKE_OK) {
LOG("aerospike_batch_get() returned %d - %s", err.code, err.message);
cleanup(&as);
exit(-1);
}
This call groups keys based on which Aerospike server node can best handle the request and initiate one batch job for each node in the cluster. There are six NUM_BATCH_THREADS batch worker threads that process all batch jobs for all nodes.
If your cluster has more than six nodes, increase the default thread count to allow full node-level parallelism.
The NUM_BATCH_THREADS paragraph section is wrong. The paragraph will be changed to:
This command groups keys based on which Aerospike server node can best handle the request and initiates one batch job for each node in the cluster. If the batch policy as_policy_batch.concurrent is false (default), the batch jobs will be executed sequentially in the same transaction thread. If concurrent is true, the batch jobs will be executed in parallel threads using the client thread pool. The client thread pool size can be configured on client initialization with as_config.thread_pool_size (default 16).
Asynchronous batch commands use a different api (aerospike_batch_read_async()), do not use the thread pool and the batch jobs are executed in parallel on the specified event loop.
There is also server side batch configuration, but that is a separate topic.
I had initially thought this was asking about server config before I realized it was miscategorized. The server config (if we are thinking of the same thing) was removed in Aerospike 4.4.