box: add pin/unping infrastructure for spaces
There are cases when we need to be sure that a space by given id or name is not deleted; and if it is replaced (in space cache), there's need to track pointer to new space. Like ib constraints: they must hold a pointer to struct space while it's very hard to determine whether there'a constraint that points to given space. Implement space pin/unpin for this purpose. You can pin a space to declare that the space is require to exist. To have to unpin it when the space is not needed anymore. NO_DOC=refactoring NO_CHANGELOG=refactoring NO_TEST=refactoring
Showing
- src/box/alter.cc 25 additions, 0 deletionssrc/box/alter.cc
- src/box/space.c 2 additions, 0 deletionssrc/box/space.c
- src/box/space.h 2 additions, 0 deletionssrc/box/space.h
- src/box/space_cache.c 81 additions, 0 deletionssrc/box/space_cache.c
- src/box/space_cache.h 74 additions, 0 deletionssrc/box/space_cache.h
Loading
Please register or sign in to comment