lua: introduce xlog.meta() method
This commit introduces the new method for xlog module: xlog.meta(). It opens an xlog file, reads and returns the meta block of the file, which includes its filetype, instance_uuid and vclocks. It's needed in order to introduce checking of names inside the config module in the following commit. Needed for #8978 @TarantoolBot document Title: xlog.meta(file-name) method Description: Open an xlog file, and return its meta block. Possible errors: Failed to open a file or it does not contain properly formatted meta block. Example: ```lua tarantool> xlog = require('xlog') --- ... tarantool> xlog.meta('00000000000000000000.snap') --- - filetype: SNAP prev_vclock: {} instance_uuid: 87b2e60f-275c-4efa-9b0e-e9562e309692 vclock: {} ... ```
Showing
- changelogs/unreleased/lua-xlog-meta.md 4 additions, 0 deletionschangelogs/unreleased/lua-xlog-meta.md
- src/box/lua/xlog.c 40 additions, 0 deletionssrc/box/lua/xlog.c
- src/box/lua/xlog.lua 5 additions, 0 deletionssrc/box/lua/xlog.lua
- test/box-luatest/xlog_reader_test.lua 14 additions, 1 deletiontest/box-luatest/xlog_reader_test.lua
changelogs/unreleased/lua-xlog-meta.md
0 → 100644
Please register or sign in to comment