Skip to content

fix: make WAL extensions into an non-dynamic early-initialized config

Summary

Make WAL extensions into a non-dynamic config initialized early into load_cfg (before any of the spaces get initialized)

Otherwise the spaces were initialized before the appropriate wal extensions were configured, leaving all of the spaces not created during the session unaffected by the extensions.

To implement this, expose cfg_get from cfg.c as cfg_get_lua to allow parsing any lua value outside of cfg.c Instead, change from a enum of extensions to wal_extensions_config structure which can be parsed from lua value with luaT_wal_ext_config_create.

Also, change cfg_set_wal_ext private lua function (which was used to set the extensions dynamically) into a stub. Can't delete it altogether because it's presence is used to indicate to the lua side whether tarantool was built with WAL extensions support enabled at compile time.

As a side-effect, errors in wal_ext configuration are now fatal (making the whole tarantool process gracefully exit with an error code), since there's no mechanism to handle errors raised in load_cfg.

Close #90 (closed) Docs follow-up: not necessary

Edited by Nikita Strygin

Merge request reports

Loading