Skip to content

[backport 3.4] memtx: fix tuple waste size calculation#11674

Merged
sergepetrenko merged 2 commits intorelease/3.4from
backport/release/3.4/11652
Jul 18, 2025
Merged

[backport 3.4] memtx: fix tuple waste size calculation#11674
sergepetrenko merged 2 commits intorelease/3.4from
backport/release/3.4/11652

Conversation

@TarantoolBot
Copy link
Collaborator

@TarantoolBot TarantoolBot commented Jul 16, 2025

(This PR is a backport of #11652 to release/3.4 to a future 3.4.1 release.)


The main part of the fix resides in the small submodule, see commit "small: improve real_size calculation in small_alloc_info". Current patch fixes the pointer that is passed to small_alloc_info() - it should point to the memtx_tuple rather than tuple. Also memtx_tuple contains uint32_t version that had not been accounted before, now these 4 bytes are added to the header_size.

Closes #10217

Gumix added 2 commits July 16, 2025 15:52
* small: drop function declarations without definitions
* small: improve real_size calculation in small_alloc_info

NO_DOC=submodule bump
NO_TEST=submodule bump
NO_CHANGELOG=submodule bump

(cherry picked from commit 8e26d51)
The main part of the fix resides in the `small` submodule, see commit
"small: improve real_size calculation in small_alloc_info". Current
patch fixes the pointer that is passed to `small_alloc_info()` - it
should point to the `memtx_tuple` rather than `tuple`. Also `memtx_tuple`
contains `uint32_t version` that had not been accounted before, now these
4 bytes are added to the `header_size`.

Closes #10217

@TarantoolBot document
Title: Remove the note regarding `waste_size` from `tuple_object.info()`
Product: Tarantool
Root document: https://www.tarantool.io/en/doc/latest/reference/reference_lua/box_tuple/info/#box-tuple-info

Remove the following note: `waste_size` is provided for reference only and
can be inaccurate. Avoid using it for memory usage calculations.

(cherry picked from commit 5a052bd)
@TarantoolBot TarantoolBot requested a review from a team as a code owner July 16, 2025 15:52
@TarantoolBot TarantoolBot changed the title [Backport release/3.4] memtx: fix tuple waste size calculation [backport 3.4] memtx: fix tuple waste size calculation Jul 16, 2025
@coveralls
Copy link

Coverage Status

coverage: 87.538% (+0.005%) from 87.533%
when pulling 5fb8b3b on backport/release/3.4/11652
into e841168
on release/3.4
.

@sergepetrenko sergepetrenko merged commit 5aae6b5 into release/3.4 Jul 18, 2025
25 checks passed
@sergepetrenko sergepetrenko deleted the backport/release/3.4/11652 branch July 18, 2025 08:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants