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

tarantool / tarantool / 14668362245
88%

Build:
DEFAULT BRANCH: master
Ran 25 Apr 2025 03:58PM 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:42PM UTC coverage: 87.504% (-0.02%) from 87.52%
14668362245

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

70406 of 124085 branches covered (56.74%)

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

56 existing lines in 16 files now uncovered.

103556 of 118344 relevant lines covered (87.5%)

2881573.27 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
87.63
0.13% src/box/vy_run.c
1
90.38
-1.92% src/lib/core/trigger.cc
1
97.41
-0.86% src/lib/vclock/vclock.c
2
94.12
-0.15% src/box/memtx_space.c
2
95.05
-0.62% src/box/raft.c
2
84.34
-0.1% src/box/xlog.c
2
84.53
-0.72% src/lib/core/coio.c
2
95.4
-2.3% src/lib/core/histogram.c
2
82.22
-4.44% src/lib/core/latch.h
2
85.71
-9.52% src/lib/core/tt_sigaction.c
2
95.45
-4.55% src/lib/json/json.h
3
90.7
-0.22% src/box/applier.cc
3
92.94
-0.2% src/lib/core/fiber.c
4
93.31
-1.27% src/lib/swim/swim_io.c
9
60.42
-4.03% src/lib/core/fio.c
18
90.88
-0.53% src/box/box.cc
Jobs
ID Job ID Ran Files Coverage
1 14668362245.1 25 Apr 2025 03:58PM UTC 518
87.5
GitHub Action Run
Source Files on build 14668362245
  • Tree
  • List 518
  • Changed 34
  • Source Changed 0
  • Coverage Changed 34
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • bea61aed on github
  • Prev Build on master (#14659133390)
  • Next Build on master (#14716983017)
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