I am using latest client & server (community edition).
If one of the node from cluster (having replication factor as 2) fails, I want write op to continue & eventually complete.
write succeeded 15000
[src/main/aerospike/as_node.c:158][as_node_destroy] 2 - as_node_destroy start for node 192.168.4.10:3000
[src/main/aerospike/as_node.c:205][as_node_destroy] 2 - as_node_destroy end for node 192.168.4.10:3000
count:15001, ev-loop:0, pending-cmds:0
End goal is to get 60000 records into DB even if one of the node fails while writes happening.
Is there any configuration policy for aerospike c client which can retry write op to different node?
You could quiesce the node before taking it down, that way it would be graceful. Otherwise, check to see if the c client supports retries and/or build your own retry logic.
When you take down a node, you will be missing a copy of some of your records. If you wait for migrations to complete, your unique-data * replication-factor objects will be restored.
And when you take down a node, there will be connection errors. You can eliminate these errors in planned events using the quiesce feature @Albot mentioned.
For unplanned events, the AS_POLICY_REPLICA_SEQUENCE policy will try the master partition first and next, if retries are enabled, it will try the next prole partition in sequence. The purpose of the REPLICA_SEQUENCE policy is to minimize these exceptions on unplanned events since the next prole is likely to become master if the master did drop. (I do not know of good reason to ever use REPLICA_ANY.)
You could also implement a custom retry mechanism on the client. I would suggest not retrying errors when in_doubt == false because this means that the current transaction cannot succeed.