When I attempt to construct a batch larger than 4096 keys/records, I get 'Cannot allocate as_bytes'
records = br.BatchRecords(
[br.Write(
key=(myNamespace, mySet, myKey),
ops=[op.write('', bytearray(value))],
) for key, value in items.items()
]
)
try:
client.batch_write(records)
except (ex.AerospikeError, ex.ClientError, ex.ServerError) as e:
log.error("Aerospike batch_write error: [{0}] {1}".format(e.code, e.msg))
Am I creating the batch incorrectly? Is there a way to get around the limitation without limiting batch_write() to 4096 records?