Ran
|
Jobs
1
|
Files
514
|
Run time
1min
|
Badge
Embed ▾
README BADGES
|
push
github
memtx: fix use-after-free on background index build When building an index in background, we create on_rollback triggers for tuples inserted concurrently. The problem here is on_rollback trigger has independent from `index` and `memtx_ddl_state` lifetime - it can be called after the index was build (and `memtx_ddl_state` is destroyed) and even after the index was altered. So, in order to avoid use-after-free in on_rollback trigger, let's drop all on_rollback triggers when the DDL is over. It's OK because all owners of triggers are already prepared, hence, in WAL or replication queue (since we build indexes in background only without MVCC so the transactions cannot yield), so if they are rolled back, the same will happen to the DDL. In order to delete on_rollback triggers, we should collect them into a list in `memtx_ddl_state`. On the other hand, when the DML statement is over (committed or rolled back), we should delete its trigger from the list to prevent use-after-free. That's why the commit adds the on_commit trigger to background build process. Closes #10620 NO_DOC=bugfix (cherry picked from commit d8d82dba4)
68521 of 121736 branches covered (56.29%)
23 of 23 new or added lines in 1 file covered. (100.0%)
35 existing lines in 18 files now uncovered.101158 of 115886 relevant lines covered (87.29%)
2505465.9 hits per line
Lines | Coverage | ∆ | File |
---|---|---|---|
1 |
89.05 |
-0.08% | src/box/vy_log.c |
1 |
90.51 |
-0.63% | src/box/engine.c |
1 |
84.26 |
-0.1% | src/box/xlog.c |
1 |
99.4 |
-0.3% | src/box/lua/iproto.c |
1 |
94.74 |
-1.75% | src/box/engine.h |
1 |
79.14 |
-0.43% | src/box/tuple_bloom.c |
1 |
93.04 |
0.0% | src/lib/core/fiber.c |
1 |
92.22 |
0.09% | src/box/vinyl.c |
2 |
86.68 |
-0.48% | src/box/vy_stmt.c |
2 |
95.79 |
-0.05% | src/box/iproto.cc |
2 |
94.18 |
-0.39% | src/box/xrow_update_field.c |
2 |
95.9 |
-0.11% | src/lib/msgpuck/msgpuck.h |
2 |
93.53 |
-1.44% | src/box/vy_point_lookup.c |
2 |
91.3 |
0.5% | src/box/box.cc |
3 |
90.93 |
-0.31% | src/box/vy_scheduler.c |
3 |
22.62 |
-0.06% | src/lib/uri/uri_parser.c |
4 |
81.82 |
-12.12% | src/lua/minifio.c |
5 |
87.6 |
-0.34% | src/box/vy_run.c |
ID | Job ID | Ran | Files | Coverage | |
---|---|---|---|---|---|
1 | 11626695895.1 | 514 |
87.29 |
GitHub Action Run |
Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line | Branch Hits | Branch Misses |
---|