Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
reader_concurrency_semaphore: Fix stop() in face of evictable reads b…
…ecoming inactive Scylla can crash due to a complicated interaction of service level drop, evictable readers, inactive read registration path. 1) service level drop invoke stop of reader concurrency semaphore, which will wait for in flight requests 2) turns out it stops first the gate used for closing readers that will become inactive. 3) proceeds to wait for in-flight reads by closing the reader permit gate. 4) one of evictable reads take the inactive read registration path, and finds the gate for closing readers closed. 5) flat mutation reader is destroyed, but finds the underlying reader was not closed gracefully and triggers the abort. By closing permit gate first, evictable readers becoming inactive will be able to properly close underlying reader, therefore avoiding the crash. Fixes #15534. Signed-off-by: Raphael S. Carvalho <raphaelsc@scylladb.com> Closes #15535
- Loading branch information