box: revert the lua space object on the space drop rollback
Before this commit the space rollback had been treated as a new space creation, so it caused creation of a new space object in the Lua's box.space namespace. Since the preceding space drop removed the space object from the namespace, on the space rollback all the Lua users of the space loosed the track of its changes: the original space object is never updated anymore. This is fixed by detecting the space rollback and restoring the old space object instead of creating a new one. Closes #9120 NO_DOC=bugfix
Showing
- changelogs/unreleased/gh-9120-space-drop-rollback.md 4 additions, 0 deletionschangelogs/unreleased/gh-9120-space-drop-rollback.md
- src/box/lua/space.cc 32 additions, 0 deletionssrc/box/lua/space.cc
- src/box/space.c 3 additions, 0 deletionssrc/box/space.c
- src/box/space.h 6 additions, 0 deletionssrc/box/space.h
- test/box-luatest/gh_9120_space_drop_rollback_test.lua 99 additions, 0 deletionstest/box-luatest/gh_9120_space_drop_rollback_test.lua
- test/box/errinj.result 0 additions, 10 deletionstest/box/errinj.result
- test/box/errinj.test.lua 0 additions, 6 deletionstest/box/errinj.test.lua
Loading
Please register or sign in to comment