Search code examples
tarantool

How to prevent possible RC


Im using Tarantool 1.5 and lua procedures.

Documentation says a lua procedure can yield execution to another after network/io operation for example, a box.update call.

My main question is: if I get return tuple from box.update does it contain information "after update, before yield" or "after update, after yield" ?

Also, what is the best-practices to prevent possible race conditions?


Solution

  • If you need to do something like a transaction in 1.5, you may do either idempotent operation or do re-select and checks after any yield operation (update/delete/replace)