Skip to content

Commit

Permalink
Adaptive changes for homestore/6.6.x (#246)
Browse files Browse the repository at this point in the history
* Avoid returning nullptr for cp_swtichover.

HS will assume the consumer not participanting CP if nullptr returned.

Signed-off-by: Xiaoxi Chen <[email protected]>

* Handle ReplServiceError::DATA_DUPLICATED

---------

Signed-off-by: Xiaoxi Chen <[email protected]>
Co-authored-by: Xiaoxi Chen <[email protected]>
  • Loading branch information
yuwmao and xiaoxichen committed Dec 24, 2024
1 parent 471e935 commit 9ef9f5f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 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
5 changes: 4 additions & 1 deletion src/lib/homestore_backend/hs_pg_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,13 @@ PGError toPgError(ReplServiceError const& e) {
case ReplServiceError::OK:
DEBUG_ASSERT(false, "Should not process OK!");
[[fallthrough]];
case ReplServiceError::DATA_DUPLICATED:
[[fallthrough]];
case ReplServiceError::FAILED:
return PGError::UNKNOWN;
default:
return PGError::UNKNOWN;
}
return PGError::UNKNOWN;
}

[[maybe_unused]] static homestore::ReplDev& pg_repl_dev(PG const& pg) {
Expand Down

0 comments on commit 9ef9f5f

Please sign in to comment.