From f4477c29d23c2be94e80389c5c2af8989c610b84 Mon Sep 17 00:00:00 2001 From: Xiaoxi Chen Date: Mon, 23 Dec 2024 14:08:00 +0800 Subject: [PATCH] Avoid returning nullptr for cp_swtichover. HS will assume the consumer not participanting CP. Signed-off-by: Xiaoxi Chen --- conanfile.py | 2 +- src/lib/homestore_backend/hs_cp_callbacks.cpp | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/conanfile.py b/conanfile.py index 56646fcf..bd8e53cd 100644 --- a/conanfile.py +++ b/conanfile.py @@ -9,7 +9,7 @@ class HomeObjectConan(ConanFile): name = "homeobject" - version = "2.1.18" + version = "2.1.19" homepage = "https://github.com/eBay/HomeObject" description = "Blob Store built on HomeReplication" diff --git a/src/lib/homestore_backend/hs_cp_callbacks.cpp b/src/lib/homestore_backend/hs_cp_callbacks.cpp index f50ce386..f54a0edd 100644 --- a/src/lib/homestore_backend/hs_cp_callbacks.cpp +++ b/src/lib/homestore_backend/hs_cp_callbacks.cpp @@ -23,7 +23,9 @@ using homestore::CPContext; namespace homeobject { -std::unique_ptr< CPContext > HSHomeObject::MyCPCallbacks::on_switchover_cp(CP* cur_cp, CP* new_cp) { return nullptr; } +std::unique_ptr< CPContext > HSHomeObject::MyCPCallbacks::on_switchover_cp(CP* cur_cp, CP* new_cp) { + return std::make_unique< CPContext >(new_cp); +} // when cp_flush is called, it means that all the dirty candidates are already in the dirty list. // new dirty candidates will arrive on next cp's context.