Articles in this section

How to check the replication state of a record?

Context

It is sometimes useful to determine the replication state of a record in Strong Consistency mode.
Aerospike has a debug metadata info call that was introduced in version 6.3
This call is only recommended for debug purpose and the debug API may change in the future.

Method

The following info command will print the metadata of a particular record by its digest and expose the repl-state value:
 
 "debug-record-meta:namespace=<ns-name>;keyd=<hex-digest>"

The repl-state can have the following values:
 
AS_REPL_STATE_REPLICATED		0
AS_REPL_STATE_REPLICATING		1
AS_REPL_STATE_RE_REPLICATING	2
AS_REPL_STATE_UNREPLICATED	3

Example using the asinfo tool:
 
asinfo -v 'debug-record-meta:namespace=test;keyd=EC91192D4B7F8CE35D5D78D34BCA65CBAAAAC960' -l                                                                                     
mycluster-1:3100 (172.17.0.2) returned:
pid=492
repl-ix=0
index=rc=0,tree-id=1,color=0,keyd=0x7f7712000044D,left=0,right=0,set-id=1,set-name=demo,in-sindex=0,xdr-bin-cemetery=0,has-bin-meta=0,xdr-write=0,xdr-tombstone=0,xdr-nsup-tombstone=0,void-time=0,lut=439003457822,generation=1,rblock-id=0,n-rblocks=0,file-id=0,key-stored=1,repl-state=0,tombstone=0,cenotaph=0,single-bin-state=0,dim=7F76CD410040
key=flat-size=5,type=3
n-bins=3
bins=bin-id=0,bin-name=foo,xdr-write=0,lut=0,src-id=0,state=1,type=1:bin-id=1,bin-name=bar,xdr-write=0,lut=0,src-id=0,state=3,type=3,data-size=3:bin-id=2,bin-name=baz,xdr-write=0,lut=0,src-id=0,state=5,type=17



 

Notes

Not for use within an application. This debug API can change without notice.

Applies To Earliest Version

Current Version

Applies To Latest Version

Current Version
Was this article helpful?
0 out of 0 found this helpful