memtx: free tuples asynchronously when primary index is dropped
When a memtx space is dropped or truncated, we have to unreference all tuples stored in it. Currently, we do it synchronously, thus blocking the tx thread. If a space is big, tx thread may remain blocked for several seconds, which is unacceptable. This patch makes drop/truncate hand actual work to a background fiber. Before this patch, drop of a space with 10M 64-byte records took more than 0.5 seconds. After this patch, it takes less than 1 millisecond. Closes #3408
Showing
- src/box/memtx_bitset.c 3 additions, 2 deletionssrc/box/memtx_bitset.c
- src/box/memtx_engine.c 39 additions, 52 deletionssrc/box/memtx_engine.c
- src/box/memtx_engine.h 30 additions, 10 deletionssrc/box/memtx_engine.h
- src/box/memtx_hash.c 57 additions, 4 deletionssrc/box/memtx_hash.c
- src/box/memtx_hash.h 2 additions, 0 deletionssrc/box/memtx_hash.h
- src/box/memtx_rtree.c 3 additions, 2 deletionssrc/box/memtx_rtree.c
- src/box/memtx_tree.c 56 additions, 4 deletionssrc/box/memtx_tree.c
- src/box/memtx_tree.h 1 addition, 0 deletionssrc/box/memtx_tree.h
- src/box/memtx_tuple.cc 11 additions, 0 deletionssrc/box/memtx_tuple.cc
- src/errinj.h 1 addition, 0 deletionssrc/errinj.h
- test/box/errinj.result 72 additions, 0 deletionstest/box/errinj.result
- test/box/errinj.test.lua 32 additions, 0 deletionstest/box/errinj.test.lua
Loading
Please register or sign in to comment