Do you have a reference for the partition-info format? The source code in cl_cluster.c does not appear to accurately describe the format: it is in blocks like
TEST:0:S:0:0:0:0:0:0;0; (that repeat per partition-id)
There are three - partition info replicas_read replicas_write
This is heavyweight, use partition_generation to know when to pull it.
You shouldn’t be using partition_info in your client. It’s a lot more information, it’s a lot more bandwidth. You should use replicas_read and replicas_write. Those have just what this server is willing to serve, and won’t change (like, if we ever change the state diagram for partitions).
partition-info may change, or the meaning might change. Aerospike has discussed a new state as they have been working on adding new features.
Here’s what the source says:
//
// DEFINITION FOR THE partition-info DATA:
//
//
name:part_id:STATE:replica_count(int):origin:target:migrate_tx:migrate_rx:sz
as_partition *p = &ns_a[i]->partitions[j];
char state_c = '?';
switch (p->state) {
case AS_PARTITION_STATE_UNDEF:
state_c = 'U';
break;
case AS_PARTITION_STATE_SYNC:
state_c = 'S';
break;
case AS_PARTITION_STATE_DESYNC:
state_c = 'D';
break;
case AS_PARTITION_STATE_ZOMBIE:
state_c = 'Z';
break;
case AS_PARTITION_STATE_WAIT:
state_c = 'W';
break;
case AS_PARTITION_STATE_LIFESUPPORT:
state_c = 'L';
break;
case AS_PARTITION_STATE_ABSENT:
state_c = 'A';
break;
default:
break;
}