Correcting the Batch Read Documentation



I came across the scenario to batch read from multiple namespaces.

URL: Aerospike documentation says that we can do batch read from within a namespace. However, using the java client jar version 3.0.30 I was able to query keys from multiple namespaces in one batch get call.


AerospikeClient client = new AerospikeClient(Constants.MACHINE1, Constants.MACHINE1_PORT);
		Key[] keys = new Key[3];
		keys[0] = new Key("test", "demo", 1);
		keys[1] = new Key("testns", "demo", 2);
		keys[2] = new Key("testns", "demo1", 1);
		Record[] records = client.get(null, keys);

Request you to guide me if I am doing something wrong or there is a performance overhead. If it seems to be correct, can we correct the documentation.



On the Server side, each batch request is specific to a namespace. The Java client add in a developer convenience and separate keys from different namespaces into separate calls.


thanks wchu.

this means in the above code example it would lead to 2 different batch calls - i.e. one for test and one for testns.

Is that right?


That is correct. Thanks