fix: make sure SCRIPT FLUSH concludes (#2565)

InterpreterManager::Reset creates now a new storage for interpreters,
 and waits for the old ones to be returned.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
This commit is contained in:
Roman Gershman 2024-02-09 18:55:14 +02:00 committed by GitHub
parent 881edb501e
commit 908efff7bd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 40 additions and 14 deletions

View file

@ -287,7 +287,7 @@ void ScriptMgr::FlushAllScript() {
lock_guard lk{mu_};
db_.clear();
shard_set->pool()->Await([](auto index, auto* pb) {
shard_set->pool()->AwaitFiberOnAll([](auto* pb) {
ServerState* ss = ServerState::tlocal();
ss->ResetInterpreter();
});