I am experimenting with maintaining a set as a list type in aerospike.
Firstly, I tried doing this purely using the Java client: read the entire record, check if element exists in list, append to list if not, then write back to aerospike. This method achieved ~3000 writes per second on my machine.
Secondly, I tried doing the same thing using this UDF (calling the UDF using the Java client) https://www.aerospike.com/docs/udf/examples/record_udf_unique_set.html This method achieved ~300 writes per second on my machine.
I expected the second way to at least perform as well as the first way, possibly better since the record doesn’t need to be sent to the client. But the UDF was miuch slower.
Does anyone know why this might be?
Not sure if it’s related but when I executed the UDF using ascli it works but always prints Segmentation fault to console.
Thanks for any help