• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

tarantool / tarantool / 14668455152
88%
master: 88%

Build:
Build:
LAST BUILD BRANCH: gh-12390-fix-vinil-memory-limit-on-recovery
DEFAULT BRANCH: master
Ran 25 Apr 2025 04:02PM UTC
Jobs 1
Files 518
Run time 2min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

25 Apr 2025 03:45PM UTC coverage: 87.533% (+0.06%) from 87.472%
14668455152

push

github

locker
memtx: handle OOM on statement rollback

Currently during statement rollback we either assume that rollback does
not fail or panic on failure. Unfortunately rollback can fail due to OOM
because of opened read view and reservations done for rollback.

Let's handle this situation similar to transaction rollback in [1].
Let's set new transaction flag `TXN_STMT_ROLLBACK` before doing
statement rollback and check it when we need to allocate memory in memtx
arena. If flag is set and memory exhausted then allocate memory outside
the arena.

Handle is added to HASH and TREE indexes. RTREE data structure does not
handle OOM's yet, we have heuristic reservation in RTREE index. BITSET
partially allocates memory using `realloc`.

To test the situation we can add something like
`ERRINJ_INDEX_ALLOC_COUNTDOWN` injection to imitate memory exhausting
during statement execution. But tests with such injection are fragile
- they depend specific pattern of memory allocation in index data
  structure. Instead let's build injection around index data structure
calls using introduced `INDEX_OOM_ERRINJ`. This way we may have
injections that are not possible but it does not hurt. It is not
a problem that we check we handle impossible failures too in tests.

[1] commit 32ea713af0a4 ("box: fix crash on rollback on memtx memory OOM
and massive index change")

Closes #11171

NO_DOC=bugfix

(cherry picked from commit bea61aed3)

70419 of 124085 branches covered (56.75%)

128 of 141 new or added lines in 5 files covered. (90.78%)

16 existing lines in 8 files now uncovered.

103590 of 118344 relevant lines covered (87.53%)

2880190.26 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
2
95.63
0.88% src/box/memtx_tree.cc
11
91.81
-2.7% src/box/memtx_hash.cc

Uncovered Existing Lines

Lines Coverage ∆ File
1
95.05
-0.31% src/box/raft.c
1
84.26
0.0% src/box/xlog.c
1
96.55
-1.15% src/lib/core/histogram.c
2
95.84
-0.11% src/box/iproto.cc
2
90.98
-0.18% src/box/memtx_engine.cc
2
95.96
-0.37% src/box/relay.cc
3
92.45
-0.09% src/box/vinyl.c
4
94.23
-0.8% src/box/xrow_update_field.c
Jobs
ID Job ID Ran Files Coverage
1 14668455152.1 25 Apr 2025 04:02PM UTC 518
87.53
GitHub Action Run
Source Files on build 14668455152
  • Tree
  • List 518
  • Changed 41
  • Source Changed 0
  • Coverage Changed 41
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • 6ddc1de2 on github
  • Prev Build on release/3.4 (#14582665005)
  • Next Build on release/3.4 (#14731012436)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc