vinyl: rotate mem on ddl
An index drop results in changing the space format, which means that statements inserted into the space after and before an index drop have different formats. When dumping an in-memory tree, we need to know the format of its statements. Keeping track of all possible formats tuples of an in-memory tree can have would be cumbersome. It's easier to simply rotate in-memory trees of all ranges of the space whose index was dropped so that each tree could only have the only format. To make it effective, we rotate trees lazily, on first insertion into a tree after ddl. To keep things simple, we rotate in-memory trees on each and every ddl, i.e. each time we see sc_version change. Note, we rotate trees in vy_commit() -> vy_tx_write() rather than in vy_prepare(). This is because sc_version is changed after WAL write.
Showing
- src/box/schema.h 4 additions, 2 deletionssrc/box/schema.h
- src/box/vinyl.c 14 additions, 2 deletionssrc/box/vinyl.c
- src/box/vy_mem.c 2 additions, 0 deletionssrc/box/vy_mem.c
- src/box/vy_mem.h 2 additions, 0 deletionssrc/box/vy_mem.h
- test/vinyl/quota.result 1 addition, 1 deletiontest/vinyl/quota.result
Loading
Please register or sign in to comment