You cannot expect to have 5 copies of data on a 3 node cluster.
If replication-factor is set greater than number of nodes (available), server will treat replication-factor == number of nodes. (Unless paxos-single-replica-limit kicks in.)
Also, replication-factor for a namespace is a static and unanimous. ie It requires a cluster wide restart to change it and cannot be changed dynamically on a running cluster. Hope that answers both 1 and 2. 5 with 5, 1 goes down, rep is treated as 4. RF5 with 3 nodes, RF is treated as 3.
Great, so this is what I expected and what I want. 5 nodes, 2 goes down, replication factor goes down to 3. 2 nodes come back, hence replication factor comes back to 5.
Hard to understand exactly what you are doing to break the cluster, step by step. Trust you are using Community Edition for your testing. You may be seeing migrations when cluster is changed. Wait for migrations to complete and then look at the records. You can monitor state of migrations on AMC. Try with Enterprise Edition - you will get the Rapid Rebalance feature.
All nodes are running Aerospike-server community edition 3.11.0.1 ( but same results with 3.10.0.1.1 ).
It’s simulating an edge case where some failure occurs and some nodes can’t reach others, while others can reach all nodes. I am fine if it is not supported, I am just trying to understand how it behaves in different scenarios.
Furthermore, I have tested 3 nodes with replication factor set to 3, and it behaves exactly the same as I described above ( 1 node has less data available and can’t write, other 2 nodes have correct amount of data and can write ). I waited couple hours for migration to happen, but it is still broken. The broken node gets in following loop:
Jan 16 2017 10:21:15 GMT: WARNING (cf:socket): (socket.c:760) Error while connecting FD 69: 111 (Connection refused)
Jan 16 2017 10:21:15 GMT: WARNING (cf:socket): (socket.c:819) Error while connecting socket to 192.168.2.2:3002
Jan 16 2017 10:21:16 GMT: WARNING (cf:socket): (socket.c:760) Error while connecting FD 69: 111 (Connection refused)
Jan 16 2017 10:21:16 GMT: WARNING (cf:socket): (socket.c:819) Error while connecting socket to 192.168.2.2:3002
Jan 16 2017 10:21:16 GMT: INFO (hb): (hb.c:2638) Marking node removal for paxos recovery: bb9d12c7cbae290
Jan 16 2017 10:21:16 GMT: INFO (paxos): (paxos.c:2614) Cluster Integrity Check: Detected succession list discrepancy between node bb9d12c7cbae290 and self bb9755a597ac40c
Jan 16 2017 10:21:16 GMT: INFO (paxos): (paxos.c:268) Paxos List [bb9d12c7cbae290,bb9a0c114ede000,bb9755a597ac40c]
Jan 16 2017 10:21:16 GMT: INFO (paxos): (paxos.c:268) Node List []
Jan 16 2017 10:21:16 GMT: INFO (paxos): (paxos.c:2614) Cluster Integrity Check: Detected succession list discrepancy between node bb9a0c114ede000 and self bb9755a597ac40c
Jan 16 2017 10:21:16 GMT: INFO (paxos): (paxos.c:268) Paxos List [bb9d12c7cbae290,bb9a0c114ede000,bb9755a597ac40c]
Jan 16 2017 10:21:16 GMT: INFO (paxos): (paxos.c:268) Node List [bb9d12c7cbae290,bb9a0c114ede000]
Jan 16 2017 10:21:16 GMT: INFO (paxos): (paxos.c:2477) Corrective changes: 1. Integrity fault: true
Jan 16 2017 10:21:16 GMT: INFO (paxos): (paxos.c:2520) Marking node add for paxos recovery: bb9a0c114ede000
Jan 16 2017 10:21:16 GMT: INFO (paxos): (paxos.c:2520) Marking node add for paxos recovery: bb9755a597ac40c
Jan 16 2017 10:21:16 GMT: INFO (paxos): (paxos.c:2543) Skipping paxos recovery: bb9a0c114ede000 will handle the recovery
Jan 16 2017 10:21:17 GMT: WARNING (cf:socket): (socket.c:750) Timeout while connecting FD 69
Jan 16 2017 10:21:17 GMT: WARNING (cf:socket): (socket.c:819) Error while connecting socket to 192.168.2.2:3002
Jan 16 2017 10:21:17 GMT: INFO (paxos): (paxos.c:2614) Cluster Integrity Check: Detected succession list discrepancy between node bb9d12c7cbae290 and self bb9755a597ac40c
Jan 16 2017 10:21:17 GMT: INFO (paxos): (paxos.c:268) Paxos List [bb9d12c7cbae290,bb9a0c114ede000,bb9755a597ac40c]
Jan 16 2017 10:21:17 GMT: INFO (paxos): (paxos.c:268) Node List []
Jan 16 2017 10:21:17 GMT: INFO (paxos): (paxos.c:2614) Cluster Integrity Check: Detected succession list discrepancy between node bb9a0c114ede000 and self bb9755a597ac40c
Jan 16 2017 10:21:17 GMT: INFO (paxos): (paxos.c:268) Paxos List [bb9d12c7cbae290,bb9a0c114ede000,bb9755a597ac40c]
Jan 16 2017 10:21:17 GMT: INFO (paxos): (paxos.c:268) Node List [bb9d12c7cbae290,bb9a0c114ede000]
Jan 16 2017 10:21:17 GMT: WARNING (cf:socket): (socket.c:750) Timeout while connecting FD 69
Jan 16 2017 10:21:17 GMT: WARNING (cf:socket): (socket.c:819) Error while connecting socket to 192.168.2.2:3002
Jan 16 2017 10:21:18 GMT: WARNING (cf:socket): (socket.c:750) Timeout while connecting FD 69
Jan 16 2017 10:21:18 GMT: WARNING (cf:socket): (socket.c:819) Error while connecting socket to 192.168.2.2:3002
Jan 16 2017 10:21:18 GMT: INFO (hb): (hb.c:2638) Marking node removal for paxos recovery: bb9d12c7cbae290
Jan 16 2017 10:21:18 GMT: INFO (paxos): (paxos.c:2614) Cluster Integrity Check: Detected succession list discrepancy between node bb9d12c7cbae290 and self bb9755a597ac40c
Jan 16 2017 10:21:18 GMT: INFO (paxos): (paxos.c:268) Paxos List [bb9d12c7cbae290,bb9a0c114ede000,bb9755a597ac40c]
Jan 16 2017 10:21:18 GMT: INFO (paxos): (paxos.c:268) Node List []
Jan 16 2017 10:21:18 GMT: INFO (paxos): (paxos.c:2614) Cluster Integrity Check: Detected succession list discrepancy between node bb9a0c114ede000 and self bb9755a597ac40c
Jan 16 2017 10:21:18 GMT: INFO (paxos): (paxos.c:268) Paxos List [bb9d12c7cbae290,bb9a0c114ede000,bb9755a597ac40c]
Jan 16 2017 10:21:18 GMT: INFO (paxos): (paxos.c:268) Node List [bb9d12c7cbae290,bb9a0c114ede000]
Jan 16 2017 10:21:18 GMT: INFO (paxos): (paxos.c:2477) Corrective changes: 1. Integrity fault: true
Jan 16 2017 10:21:18 GMT: INFO (paxos): (paxos.c:2520) Marking node add for paxos recovery: bb9a0c114ede000
Jan 16 2017 10:21:18 GMT: INFO (paxos): (paxos.c:2520) Marking node add for paxos recovery: bb9755a597ac40c
Jan 16 2017 10:21:18 GMT: INFO (paxos): (paxos.c:2543) Skipping paxos recovery: bb9a0c114ede000 will handle the recovery
Jan 16 2017 10:21:18 GMT: WARNING (cf:socket): (socket.c:760) Error while connecting FD 69: 111 (Connection refused)
Jan 16 2017 10:21:18 GMT: WARNING (cf:socket): (socket.c:819) Error while connecting socket to 192.168.2.2:3002
Jan 16 2017 10:21:19 GMT: WARNING (cf:socket): (socket.c:760) Error while connecting FD 69: 111 (Connection refused)
Jan 16 2017 10:21:19 GMT: WARNING (cf:socket): (socket.c:819) Error while connecting socket to 192.168.2.2:3002
As mention above, I appreciate it’s an edge case and I am fine with behaviour if it is unsupported failure mode.
Thanks,
-Vytas