Q. I need to update box.space.myspace on_replace triggers on my module load.
How do I do it the right way? (2016)
on_replace takes two keys: new one and old one. If the old one is nil, it's a new trigger. If the new one is nil, it's deletion. If both keys are present, it's an update.
A function in Lua is a first-class object, so it works well as a key.