Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Manipulate multiple Aerospike Sets consistently using a single UDF

Is there a way to write a single Aerospike UDF(in lua), which has the ability to consistently manipulate mulitple aerospike sets(not records).

Example:-

I have Aerospike Sets {P, Q}. I have to manipulate a record, Rp of Set P, and a record, Rq of Set Q in a single UDF. If any of the set manipulation fails, both set records should revert to the original state, i.e. consistency should be maintained.

Any way out?

like image 701
Rahul Chawla Avatar asked Dec 09 '25 21:12

Rahul Chawla


1 Answers

You can't do this. A record UDF allows you to manipulate a single record. A stream UDF allows you to build aggregate functions like SUM, COUNT, MIN, MAX, AVG, but they're read-only.

like image 52
Ronen Botzer Avatar answered Dec 11 '25 13:12

Ronen Botzer