box: fully temporary spaces
Introduce fully temporary spaces: same as data-temporary space but with temporary metadata. Basically temporary spaces now do not exist on restart and do not exist on replicas. They can also be created, altered and deleted when box.cfg.read_only = true. To avoid conflicts with spaces created on replicas, the temporary space ids by default start in a special range starting at BOX_SPACE_ID_TEMPORARY_MIN. Temporary spaces currently do not support several features e.g. foreign key references (to and from), functional indexes, sql sequences, sql triggers, etc. This may change in the future. Implementing temporary spaces requires temporary tuples to be inserted into system spaces: tuples which are neither replicated or persisted. This mostly done in on_replace_dd_* triggers by dropping the txn->stmt->row. Closes #8323 @TarantoolBot document Title: Introduce fully temporary spaces with temporary metadata Temporary spaces are now data-temporary spaces with temporary metadata. Created by specifying { type = "temporary" } in the options. Temporary spaces will not exist upon server restart and will not exist on replicas. They can also be created in read-only mode.
Showing
- changelogs/unreleased/fully-temporary-spaces.md 6 additions, 0 deletionschangelogs/unreleased/fully-temporary-spaces.md
- src/box/alter.cc 81 additions, 7 deletionssrc/box/alter.cc
- src/box/box.cc 37 additions, 19 deletionssrc/box/box.cc
- src/box/box.h 1 addition, 1 deletionsrc/box/box.h
- src/box/lua/misc.cc 4 additions, 1 deletionsrc/box/lua/misc.cc
- src/box/lua/schema.lua 29 additions, 10 deletionssrc/box/lua/schema.lua
- src/box/lua/space.cc 2 additions, 0 deletionssrc/box/lua/space.cc
- src/box/memtx_engine.cc 54 additions, 0 deletionssrc/box/memtx_engine.cc
- src/box/schema_def.h 8 additions, 1 deletionsrc/box/schema_def.h
- src/box/space.h 7 additions, 0 deletionssrc/box/space.h
- src/box/space_def.c 40 additions, 0 deletionssrc/box/space_def.c
- src/box/space_def.h 26 additions, 0 deletionssrc/box/space_def.h
- src/box/sql/select.c 1 addition, 1 deletionsrc/box/sql/select.c
- src/box/sql/vdbe.c 1 addition, 1 deletionsrc/box/sql/vdbe.c
- src/box/tuple_constraint_fkey.c 6 additions, 0 deletionssrc/box/tuple_constraint_fkey.c
- src/box/txn.c 12 additions, 1 deletionsrc/box/txn.c
- src/box/txn.h 18 additions, 0 deletionssrc/box/txn.h
- test/box-luatest/fully-temporary_spaces_test.lua 523 additions, 0 deletionstest/box-luatest/fully-temporary_spaces_test.lua
- test/box/access.result 3 additions, 0 deletionstest/box/access.result
- test/box/access.test.lua 1 addition, 0 deletionstest/box/access.test.lua
Loading
Please register or sign in to comment