vinyl: fix cache invalidation on rollback of DELETE statement
Once a statement is prepared to be committed to WAL, it becomes visible (in the 'read-committed' isolation level) so it can be added to the tuple cache. That's why if the statement is rolled back due to a WAL error, we have to invalidate the cache. The problem is that the function invalidating the cache (`vy_cache_on_write`) ignores the statement if it's a DELETE judging that "there was nothing and there is nothing now". This is apparently wrong for rollback. Fix it. Closes #10879 NO_DOC=bug fix (cherry picked from commit d64e29da2c323a4b4fcc7cf9fddb0300d5dd081f)
Showing
- changelogs/unreleased/gh-10879-fix-vinyl-cache-invalidation-on-rollback.md 5 additions, 0 deletions...ased/gh-10879-fix-vinyl-cache-invalidation-on-rollback.md
- src/box/vy_cache.c 20 additions, 4 deletionssrc/box/vy_cache.c
- src/box/vy_cache.h 8 additions, 0 deletionssrc/box/vy_cache.h
- src/box/vy_lsm.c 1 addition, 3 deletionssrc/box/vy_lsm.c
- test/vinyl-luatest/gh_10879_invalidate_cache_on_rollback_test.lua 75 additions, 0 deletions...yl-luatest/gh_10879_invalidate_cache_on_rollback_test.lua
Loading
Please register or sign in to comment