0

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?

Galimov Albert
  • 7,269
  • 1
  • 24
  • 50
  • After update, before yield. In 1.6, the best practice against race is using transactions. In 1.5, you have to understand how the scheduler works. – Kostja May 24 '16 at 13:57

1 Answers1

2

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)

Mons Anderson
  • 421
  • 2
  • 5