Skip to content

Commit

Permalink
Avoid returning nullptr for cp_swtichover.
Browse files Browse the repository at this point in the history
HS will assume the consumer not participanting CP if nullptr returned.

Signed-off-by: Xiaoxi Chen <[email protected]>
  • Loading branch information
xiaoxichen committed Dec 23, 2024
1 parent b9d3fbf commit 197d52e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 3 additions & 1 deletion src/lib/homestore_backend/hs_cp_callbacks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 197d52e

Please sign in to comment.