How to update the list of bins in the ship-bin XDR parameter

Have an existing XDR config e.g.: asinfo -v “get-config:context=xdr;dc=mydc;namespace=myns” enabled=true;bin-policy=changed-and-specified;compression-level=1;delay-ms=0;enable-compression=false;forward=false;hot-key-ms=100;ignored-bins=;ignore-expunges=false;ignored-sets=;max-throughput=100000;remote-namespace=null;sc-replication-wait-ms=100;shipped-bins=BIN1,BIN2;ship-nsup-deletes=false;ship-only-specified-sets=false;shipped-sets=;transaction-queue-limit=16384;write-policy=auto want to change the ship-bin list to BIN3,BIN4, but am not sure exactly how to phrase the set-config command as simply saying: asinfo -v "set-config:context=xdr;dc=mydc;namespace=myns;ship-bin=BIN3,BIN4" appears to concatenate the lists instead of setting the new one… Have not worked out a combination of action=add/action=delete that seems to do what I want! I suspect this is not really an XDR problem but my figuring out how set-config deals with lists!

I think BIN1 and BIN2 are shipped because they have changed. Note the bin-policy is “changed-and-specified” (or by default “all”), If you do not want BIN1 and BIN2 even if they change, you can add them to “ignored-bins” list. Please see the bin policy documentation to achieve the exact semantics you desire.

Hi. I did not explain clearly enough. Actually in this case the specific bins are theoretical.

I am working on a set of experiments to scale up the use of XDR. During this period the intention is to gradually increase the list of bins to ship while we watch system performance. I am working on describing the process for operators and have documented how to change our static config and the remaining step to document is how we change the config dynamically to match.

I was running some tests and tried to modify this value from ship-bins:X to ship-bins:X,Y and inadvertently ended up with ship-bins:X,X,Y! I am using the fact that Aerospike records do not have a fixed schema to be my config testing on bins that should not contain data before I start messing with those that do!

I believe specifying the new ship-bins list - in conjunction with the correct bin-policy (note the default is “all” bins) - should work. If it is not working as expected, a reproducible example will help a lot.

What are you seeing at the destination cluster when you “ended up with ship-bins:X,X,Y”? Or is the issue that a non-existent bin at source got created at the destination? Thanks for clarifying.

Here’s a rough transcript of what I tried showing the before and after values for the config.

asinfo -v "get-config:context=xdr;dc=mydc;namespace=myns"

enabled=true;bin-policy=changed-and-specified;compression-level=1;delay-ms=0;enable-compression=false;forward=false;hot-key-ms=100;ignored-bins=;ignore-expunges=false;ignored-sets=;max-throughput=100000;remote-namespace=null;sc-replication-wait-ms=100;shipped-bins=**BIN1**;ship-nsup-deletes=false;ship-only-specified-sets=false;shipped-sets=;transaction-queue-limit=16384;write-policy=auto

sudo asinfo -v "set-config:context=xdr;dc=mydc;namespace=myns;ship-bin=BIN1,BIN2"

ok

asinfo -v "get-config:context=xdr;dc=mydc;namespace=myns"

enabled=true;bin-policy=changed-and-specified;compression-level=1;delay-ms=0;enable-compression=false;forward=false;hot-key-ms=100;ignored-bins=;ignore-expunges=false;ignored-sets=;max-throughput=100000;remote-namespace=null;sc-replication-wait-ms=100;shipped-bins=**BIN1,BIN1,BIN2**;ship-nsup-deletes=false;ship-only-specified-sets=false;shipped-sets=;transaction-queue-limit=16384;write-policy=auto

To clarify I am only testing things out and am not actually choosing bins that will involve moving any data. Once I have the procedures down, I will start using bins I care about, but, for example, I want to be sure that if I have the experiment set up to ship bins A, B and C and something goes wrong with B that I know how to change the config to A, C in a hurry… Not anticipating problems but when the experiment is in production it does not hurt to be cautious!

ship-bin as a config parameter in the config file can be entered multiple times i.e.

ship-bin BIN1
ship-bin BIN2
ship-bin BIN3

So when you try to do the same thing dynamically, using asinfo, specify one bin at a time. When you specify

ship-bin=BIN1,BIN2

… it is interpreting the new bin name as: “BIN1,BIN2” hence your shipped-bins = BIN1 … & … BIN1,BIN2 … two bins, first with bin-name BIN1, second with bin-name BIN1,BIN2

Thank you! That is exactly what I was looking for.

One small follow on. I was trying to clean up and ran: asinfo -v "set-config:context=xdr;dc=mydc;namespace=myns;ship-bin=BIN1,BIN2;action=remove" and I get an ok but when I do a get-config I still see: ~BIN1,BIN1,BIN2"…

Based on the internal discussion, it seems currently there is no way to remove a bin added through set-config ship-bin or ignore-bin. You must restart the server, if necessary, after editing the config file. The server will then start using the config from the config file. Hope this helps.

Got it…thanks.

You should be able to clean up by issuing the corresponding ignore-bin command.

asinfo -v "set-config:context=xdr;dc=mydc;namespace=myns;ignore-bin=BIN1,BIN2"

Actually, that wouldn’t really do what you were looking for as it wouldn’t ‘clean up’ per se, but move a bin name from ship-bin to ignore-bin…

Good to know, however, because it is likely to be faster than a restart in an emergency! Thanks.

This topic was automatically closed 84 days after the last reply. New replies are no longer allowed.