|
Ran
|
Jobs
1
|
Files
479
|
Run time
1min
|
Badge
README BADGES
|
push
github
vinyl: fix crash in index drop if there is DML request reading from it A DML request (insert, replace, update) can yield while reading from the disk in order to check unique constraints. In the meantime the index can be dropped. The DML request can't crash in this case thanks to commit d3e1236956515 ("vinyl: abort affected transactions when space is removed from cache"), but the DDL operation can because: - It unreferences the index in `alter_space_commit`, which may result in dropping the LSM tree with `vy_lsm_delete`. - `vy_lsm_delete` may yield in `vy_range_tree_free_cb` while waiting for disk readers to complete. - Yielding in commit triggers isn't allowed (crashes). We already fixed a similar issue when `index.get` crashed if raced with index drop, see commit 75f03a50df4a ("vinyl: fix crash if space is dropped while space.get is reading from it"). Let's fix this issue in the same way - by taking a reference to the LSM tree while checking unique constraints. To do that it's enough to move `vy_lsm_ref` from `vinyl_index_get` to `vy_get`. Also, let's replace `vy_slice_wait_pinned` with an assertion checking that the slice pin count is 0 in `vy_range_tree_free_cb` because `vy_lsm_delete` must not yield. Closes #10094 NO_DOC=bug fix (cherry picked from commit bde28f0fa)
62654 of 113878 branches covered (55.02%)
8 of 10 new or added lines in 2 files covered. (80.0%)
21 existing lines in 12 files now uncovered.93542 of 108986 relevant lines covered (85.83%)
2427874.32 hits per line
| ID | Job ID | Ran | Files | Coverage | |
|---|---|---|---|---|---|
| 1 | 9415620077.1 | 0 |
85.83 |
GitHub Action Run |