From 8c310b95f8cf0a2123da5eed7e6621b6f94f30e0 Mon Sep 17 00:00:00 2001 From: HeYuchen Date: Fri, 11 Feb 2022 17:01:59 +0800 Subject: [PATCH] fix: shutdown error while close replica (#1052) --- include/dsn/dist/replication/replication_app_base.h | 5 ----- src/replica/replica.cpp | 4 ---- 2 files changed, 9 deletions(-) diff --git a/include/dsn/dist/replication/replication_app_base.h b/include/dsn/dist/replication/replication_app_base.h index 11c7e69c02..e6ef108fd6 100644 --- a/include/dsn/dist/replication/replication_app_base.h +++ b/include/dsn/dist/replication/replication_app_base.h @@ -113,11 +113,6 @@ class replication_app_base : public replica_base // error_code open(); - // - // Cancel all background flush and compaction work. - // - virtual void cancel_background_work(bool wait) {} - // // Close the app. // If `clear_state' is true, means clear the app state after close it. diff --git a/src/replica/replica.cpp b/src/replica/replica.cpp index 03a738f89b..b271f354eb 100644 --- a/src/replica/replica.cpp +++ b/src/replica/replica.cpp @@ -434,10 +434,6 @@ void replica::close() _checkpoint_timer = nullptr; } - if (_app != nullptr) { - _app->cancel_background_work(true); - } - _tracker.cancel_outstanding_tasks(); cleanup_preparing_mutations(true);