Skip to content

10.3.0

Latest

Choose a tag to compare

@BrianNichols BrianNichols released this 12 Jun 16:47
8ebf34e

Release Date: June 12, 2026

Bug Fixes

  • Resolve batch sendKey correctly before setting in the wire protocol. [CLIENT-4898]

Since version 8.1.1, batch sendKey was resolved from different client policies depending on whether the multiple keys were sent to a node or a single key was sent to a node. This is inconsistent behavior which ultimately required the user to enable sendKey for all batch policy types (except dynamic config) for the batch to function properly. The batch policy types are:

  • Dynamic config batch_write.send_key
  • AerospikeClient.batchPolicyDefault.sendKey. Cluster default for parent batch read.
  • AerospikeClient.batchParentPolicyWriteDefault.sendKey. Cluster default for parent batch write/UDF/delete.
  • AerospikeClient.batchWritePolicyDefault.sendKey. Cluster default for key specific batch write/UDF/delete.
  • BatchWrite.policy.sendKey. Batch write policy for a specific key.
  • BatchUDF.policy.sendKey. Batch UDF policy for a specific key.
  • BatchDelete.policy.sendKey. Batch delete policy for a specific key.

Version 10.3.0 simplifies sendKey resolution by enabling sendKey when any batch write policy type sendKey is true. The batch read policy type (batchPolicyDefault) is no longer recognized for batch writes because that policy is only intended for a read-only batch. Read commands do not need to send the user key to the server.

To enable sendKey for all writes to a cluster, set the following cluster defaults on startup:

ClientPolicy cp = new ClientPolicy();
cp.writePolicyDefault.sendKey = true; // For single record writes.
cp.batchParentPolicyWriteDefault.sendKey = true; // For batch writes.

AerospikeClient client = new AerospikeClient(cp, seeds);

If any batch policy is overridden by the user, that policy sendKey should be consistent with the cluster defaults:

// Override from system default.
BatchPolicy bp = new BatchPolicy();
bp.totalTimeout = 500;
bp.sendKey = true;

client.operate(bp, recs);

// Override from cluster default.
bp = client.copyBatchParentPolicyWriteDefault();
bp.totalTimeout = 500;
bp.sendKey = true;  // This line is not needed if the cluster default sendKey was already true.

client.operate(bp, recs);

Full Changelog: 10.2.0...10.3.0