txm: make replace in indexes less dependent
There was a obvious bug in transactinal manager's GC. There can be stories about deleted tuples. In other word tuples were deleted, but their story remains for history for some time. That means that pointers to dirty tuples are left in indexes, while the stories say that that tuples are deleted. When GC comes, it must remove pointer to tuple from indexes too. That is simple to check - if a story is on top of chain - it must be in index, and if it is a story about deleted tuple - it must be removed from index. But also that story must be unliked from chain, and the next story becomes the top on chain, but (1) in turn it must not try to delete its tuple from index - we have already done it, deleting the first tuple. For this purpose we mark the next story with space = NULL. The problem is that setting space = NULL work for every index at once, while sometimes we have to hande each index independently. Fortunately the previous commit introduced in_index member of story's link, NULL by default. We can just leave that NULL in older story as a mark that is not in index. This commit makes so and fixes the bug. Closes #6234
Showing
- changelogs/unreleased/gh-6234-mvcc-suspicious-tuning.md 3 additions, 0 deletionschangelogs/unreleased/gh-6234-mvcc-suspicious-tuning.md
- src/box/memtx_tx.c 1 addition, 10 deletionssrc/box/memtx_tx.c
- test/box/tx_man.result 74 additions, 0 deletionstest/box/tx_man.result
- test/box/tx_man.test.lua 33 additions, 0 deletionstest/box/tx_man.test.lua
Loading
Please register or sign in to comment