[Tarantool-patches] [PATCH] box: make box.execute() immutable
Alexander Turenko
alexander.turenko at tarantool.org
Thu Dec 26 17:08:35 MSK 2019
> function box.execute(...)
> - load_cfg()
> + --
> + -- Calling box.execute before explicitly configuring box led to
> + -- automatic box.cfg invocation nonetheless. Following explicit
> + -- attempts to configure box led to its reconfiguratin and as a
> + -- result - to an error when trying to use execute method again.
> + -- The check makes sure box.execute is an immutable function.
> + --
I would describe all this hell with registering lbox_execute as
box.execute, moving it to box_cfg_guard_whitelist, adding this
box.execute function, then replacing back with lbox_execute at
load_cfg().
This description would make clear why everything is fine if we just call
box.execute(), but extra flag is necessary if a user saved box.execute
before first box.execute() or box.cfg() call.
More information about the Tarantool-patches
mailing list