Hi
What is the best way to disable incoming XDR traffic on a site without restarting Aerospike DB?
Hi
What is the best way to disable incoming XDR traffic on a site without restarting Aerospike DB?
See configuration parameter: allow-xdr-writes
In this case, the source xdr will stop writing data to digestlog. This is is outbound traffic. However, what is required is that any datacenter should stop receiving xdr traffic from all the sources i.e. stop receiving inbound traffic
Hope the test below helps.
Consider a case: DC1 → shipping to DC2. (namespaces match etc)
If I insert a record on DC1 (eg namespace ns1), it shows up on DC2.
aql> insert into ns1.set1 (pk, b) values (1,1)
If on DC2 I set allow-xdr-writes
to false, (default is true), DC2 will reject incoming xdr writes from DC1.
[DC2] $ asinfo -v 'set-config:context=namespace;id=ns1;allow-xdr-writes=false'
And on DC2 logs, I see:
Feb 12 2018 16:59:07 GMT: INFO (info): (thr_info.c:2766) Changing value of allow-xdr-writes of ns ns1 from true to false
Feb 12 2018 16:59:07 GMT: INFO (info): (thr_info.c:3022) config-set command completed: params context=namespace;id=ns1;allow-xdr-writes=false
If I insert a record on DC1:
aql> insert into ns1.set1 (pk, b) values (2,2)
On DC1 logs, I see:
Feb 12 2018 16:59:19 GMT: WARNING (xdr): (xdr_ship.c:937) An unexpected write error happened to DC DC2. Code 22: AEROSPIKE_ERR_FAIL_FORBIDDEN at /work/source/modules/ee/xdr/../modules/client/src/main/aerospike/as_event.c:772.<Digest>:0xe005c25a9eeb151e363051415453171b50c74cc4
Now, I go back to DC2 and set allow-xdr-writes again to true:
[DC2] $ asinfo -v 'set-config:context=namespace;id=ns1;allow-xdr-writes=true'
DC2 log shows:
Feb 12 2018 17:06:13 GMT: INFO (info): (thr_info.c:2762) Changing value of allow-xdr-writes of ns ns1 from false to true
Feb 12 2018 17:06:13 GMT: INFO (info): (thr_info.c:3022) config-set command completed: params context=namespace;id=ns1;allow-xdr-writes=true
Now, when I insert a record on DC1, it is shipped to DC2.
aql> insert into ns1.set1 (pk, b) values (3,3)
3,3 shows up on DC2. [ Note: (2,2) does not come ]
On DC2:
[aql> select * from ns1
+---+
| b |
+---+
| 3 |
| 1 |
+---+
2 rows in set (0.018 secs)