mirror of
https://github.com/scylladb/scylladb.git
synced 2026-06-09 16:33:35 +00:00
"Fixes for commitlog (debug) test failures related to shutdowns. Note that most the fixes here are only really related to the tests failing, not really real scylla runs. However, at some point we'll have real shutdown in scylla as well (not just hard exit), at which point this becomes more relevant there as well. Main issue was post-flush continuation chains for stats update remaining unexecuted, due to task reordering, once the commitlog object itself had been destroyed. This could have been handled by just making the stats object a shared pointer, but in general it seems more prudent to enforce having all tasks completed after shutdown. * Change commitlog shutdown to use gate+wait for all outstanding ops (flush, write, timer). Thus we can ensure everything is finished when returning from "shutdown". * Fix bug with "commitlog::clear" (test method) not doing the intended deed * Most importantly, fix the tests themselves, cleaning up old crud, and fixing invalid assumptions (CL behaviour changed quite a bit since tests were created), and remove races. Disclaimer: I've _never_ managed to reproduce the debug tests failing like in jenkins locally (though I managed to provoke other failures), but at least jenkins runs with this series have been clean. Knock knock."