Skip to content
Snippets Groups Projects
Commit cc24a1d3 authored by Aleksandr Lyapunov's avatar Aleksandr Lyapunov Committed by Aleksandr Lyapunov
Browse files

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
parent 914a36da
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment