Skip to content
Snippets Groups Projects
Commit 525456f8 authored by Vladimir Davydov's avatar Vladimir Davydov Committed by Vladimir Davydov
Browse files

vinyl: re-fix crash in read iterator on rollback due to WAL error

After scanning disk, the Vinyl read iterator checks if it should restore
the iterator over the active memory tree, because new tuples could have
been inserted into it while we yielded reading disk. We assume that
existing tuples can't be deleted from the memory tree, but that's not
always true - a tuple may actually be deleted by rollback after a failed
WAL write. Let's reevaluate all scanned sources and reposition the read
iterator to the next statement if this happens.

Initially, the issue was fixed by commit 83462a5c ("vinyl: restart
read iterator in case L0 is changed"), but it introduced a performance
degradation and was reverted (see #5700).

NO_DOC=bug fix
NO_TEST=already there
NO_CHANGELOG=already there
parent 2db6159e
No related branches found
No related tags found
No related merge requests found
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