vinyl: skip invisible read sources
A Vinyl read iterator scans all read sources (memory and disk levels) even if it's executed in a read view from which most of the sources are invisible. As a result, a long running scanning request may spend most of the time skipping invisible statements. The situation is exacerbated if the instance is experiencing a heavy write load because it would pile up old statement versions in memory and force the iterator to skip over them after each disk read. Since the replica join procedure in Vinyl uses a read view iterator under the hood, the issue is responsible for a severe performance degradation of the master instance and the overall join procedure slowdown when a new replica is joined to an instance running under a heavy write load. Let's fix this issue by making a read iterator skip read sources that aren't visible from its read view. Closes #10846 NO_DOC=bug fix (cherry picked from commit 6a214e42e707b502022622866d898123a6f177f1)
Showing
- changelogs/unreleased/gh-10846-fix-vinyl-replica-join-degradation-under-write-load.md 5 additions, 0 deletions...46-fix-vinyl-replica-join-degradation-under-write-load.md
- src/box/vy_read_iterator.c 34 additions, 0 deletionssrc/box/vy_read_iterator.c
- test/vinyl-luatest/gh_10846_skip_invisible_read_src_test.lua 75 additions, 0 deletionstest/vinyl-luatest/gh_10846_skip_invisible_read_src_test.lua
Loading
Please register or sign in to comment