I know that there is an ‘info’ API that I can use to fetch XDR configuration information such as ‘enable-xdr’, ‘sets-enable-xdr’, etc.
But I couldn’t find an example to know the following:
To know the number of DCs a specific namespace is configured to be replicated.
To know the XDR configuration for specific sets
pgupta
February 7, 2018, 5:04am
2
Are you using Community Edition?
We have the Enterprise edition
pgupta
February 7, 2018, 6:24am
4
On source DC: (In the example below, I have namespace ns1 shipping to DC1, DC2 is just a skeletal DC)
1 - $ grep dc-state /var/log/aerospike/aerospike.log
– tells you which DCs are UP vs INACTIVE
2 - $ asinfo -v "dcs"
– show all remote datacenters defined (skeletal or otherwise)
DC1;DC2
3 - $ asinfo -v "get-dc-config" -l
– this will tell you what namespaces are shipping to what DCs
dc-name=DC1 :nodes=172.31.16.6+3000:int-ext-ipmap=:dc-connections=64:dc-connections-idle-ms=55000:dc-use-alternate-services=false:tls-name=:namespaces=ns1
dc-name=DC2 :nodes=:int-ext-ipmap=:dc-connections=64:dc-connections-idle-ms=55000:dc-use-alternate-services=false:tls-name=:namespaces=
Regarding sets - its a two step thing.
$ asadm
Admin> asinfo -v “namespace/ns1” -l like xdr
ip-172-31-26-84.ec2.internal:3000 (172.31.26.84) returned:
xdr_write_success=0
xdr_write_error=0
xdr_write_timeout=0
fail_xdr_forbidden=0
enable-xdr=true
sets-enable-xdr=true
ns-forward-xdr-writes=false
allow-nonxdr-writes=true
allow-xdr-writes=true
Admin> asinfo -v “sets” -l like xdr
ip-172-31-26-84.ec2.internal:3000 (172.31.26.84) returned:
ns=ns1:set=set_id1 :objects=1:tombstones=0:memory_data_bytes=0:truncate_lut=0:stop-writes-count=0:set-enable-xdr=false :disable-eviction=false
ns=ns1:set=set_id2 :objects=1:tombstones=0:memory_data_bytes=0:truncate_lut=0:stop-writes-count=0:set-enable-xdr=use-default :disable-eviction=false
ns=ns1:set=set_id3 :objects=0:tombstones=0:memory_data_bytes=0:truncate_lut=0:stop-writes-count=0:set-enable-xdr=use-default :disable-eviction=false
Here, default for sets is true, set_id1 is “blacklisted” - xdr set to false.
Ok. Thanks. I will try these out myself once I have my DCs ready.
I believe the above information fetched by asinfo is also accessible by the java client as mentioned here .