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

memtx: decompress tuples in snapshot iterator

Compressed tuples aren't supposed to be seen outside memtx internals:
we always decompresses tuples before returning them to the user; tuples
are written decompressed to xlog. We should also decompress tuples
before writing them to a snapshot or sending them to a remote replica,
but currently we don't, which results in a crash trying to recover from
a snapshot that contains compressed spaces.

This patch fixes this by decompressing all tuples in snapshot iterator.
Since the decompressed tuples are allocated on the region, we should
also call fiber_gc() after each snapshot iterator iteration. Note that
the decompression is unconditional, i.e. we try to decompress all
tuples stored in an index. In general we can't figure out if a tuple is
compressed, because its format may be unavailable (when a tuple is
freed, its format_id is overwritten).

Needed for https://github.com/tarantool/tarantool-ee/issues/171

NO_DOC=bug fix
NO_TEST=ee
NO_CHANGELOG=ee
parent 8d8e6e60
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