Skip to content
Snippets Groups Projects
Commit 939c2f9a authored by Vladimir Davydov's avatar Vladimir Davydov Committed by Konstantin Osipov
Browse files

vinyl: truncate region after extracting key from tuple

tuple_extract_key() uses region to store the result. If the region is
not truncated, as it is currently the case, the memory consumption can
rocket sky high during a transaction execution. This is especially
critical in case of select() or pairs() over a secondary index.

To fix that, let's introduce vy_stmt_extract_key() wrapper, which would
store the result on malloc, and use it throughout the code. Note, this
doesn't add malloc() invocations, because malloc() has to be invoked by
vy_index_get() anyway - we just move it up.
parent 9fe25b1d
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