Ran
|
Jobs
1
|
Files
514
|
Run time
2min
|
Badge
Embed ▾
README BADGES
|
push
github
vinyl: handle error loading statement from disk during key lookup `vy_page_stmt()` may fail (return NULL) if: - the statement is corrupted; - memory allocation for the statement fails; - the statement size exceeds `box.cfg.vinyl_max_tuple_size`. If this happens `vy_page_find_key()` won't return an error. Instead, it'll either point the caller to a wrong statement or claim that there's no statement matching the key in this page. This may result in invalid index selection results and, later on, a crash caused by inconsistencies in the tuple cache. The issue was introduced by commit ac8ce0233a00 ("vinyl: factor out function to lookup key in page"). All of the three cases are actually very unlikely to happen in production: - If a statement stored in a run file is corrupted, we'll probably fail to load the whole page due to failed checksums and never even get to `vy_page_stmt()`. - Statements are allocated with `malloc()`, which doesn't normally fail (instead the whole process would be terminated by OOM) . - Users don't tend to lower the tuple size limit after restart. Still, let's fix the issue by implementing proper error handling for `vy_page_find_key()`. Closes #10512 NO_DOC=bug fix (cherry picked from commit 9dbaa6a9b)
68347 of 121609 branches covered (56.2%)
9 of 11 new or added lines in 1 file covered. (81.82%)
25 existing lines in 12 files now uncovered.101003 of 115824 relevant lines covered (87.2%)
2451143.65 hits per line
Lines | Coverage | ∆ | File |
---|---|---|---|
2 |
87.79 |
0.23% | src/box/vy_run.c |
Lines | Coverage | ∆ | File |
---|---|---|---|
1 |
93.56 |
-0.17% | src/box/txn_limbo.c |
1 |
85.48 |
-1.61% | src/box/lua/ctl.c |
1 |
96.55 |
-1.15% | src/histogram.c |
1 |
22.68 |
-0.02% | src/lib/uri/uri_parser.c |
1 |
95.15 |
-0.19% | src/box/relay.cc |
1 |
94.86 |
-0.14% | src/box/replication.cc |
1 |
94.52 |
-0.15% | src/box/vy_tx.c |
2 |
90.81 |
-0.03% | src/box/box.cc |
2 |
85.71 |
-9.52% | src/lib/core/tt_sigaction.c |
4 |
81.82 |
-12.12% | src/lua/minifio.c |
4 |
92.03 |
-0.09% | src/box/vinyl.c |
6 |
93.76 |
-1.21% | src/box/xrow_update_field.c |
ID | Job ID | Ran | Files | Coverage | |
---|---|---|---|---|---|
1 | 10737856452.1 | 514 |
87.2 |
GitHub Action Run |
Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line | Branch Hits | Branch Misses |
---|