view_update_generator: Unplug from database later
Patch 967ebacaa4 (view_update_generator: Move abort kicking to
do_abort()) moved unplugging v.u.g from database from .stop() to
.do_abort(). The latter call happens very early on stop -- once scylla
receives SIGINT. However, database may still need v.u.g. plugged to
flush views.
This patch moves unplug to later, namely to .stop() method of v.u.g.
which happens after database is drained and should no longer continue
view updates.
fixes: #16001
Signed-off-by: Pavel Emelyanov <xemul@scylladb.com>
Closes scylladb/scylladb#16091
This commit is contained in:
committed by
Botond Dénes
parent
fd11eeeaa3
commit
3471f30b58
@@ -234,12 +234,12 @@ void view_update_generator::do_abort() noexcept {
|
|||||||
}
|
}
|
||||||
|
|
||||||
vug_logger.info("Terminating background fiber");
|
vug_logger.info("Terminating background fiber");
|
||||||
_db.unplug_view_update_generator();
|
|
||||||
_as.request_abort();
|
_as.request_abort();
|
||||||
_pending_sstables.signal();
|
_pending_sstables.signal();
|
||||||
}
|
}
|
||||||
|
|
||||||
future<> view_update_generator::stop() {
|
future<> view_update_generator::stop() {
|
||||||
|
_db.unplug_view_update_generator();
|
||||||
do_abort();
|
do_abort();
|
||||||
return std::move(_started).then([this] {
|
return std::move(_started).then([this] {
|
||||||
_registration_sem.broken();
|
_registration_sem.broken();
|
||||||
|
|||||||
Reference in New Issue
Block a user