Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
JacksonYao287 committed Dec 8, 2023
1 parent 4dc0358 commit 63679a7
Show file tree
Hide file tree
Showing 3 changed files with 11 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 = "0.13.1"
version = "0.13.2"
homepage = "https://github.com/eBay/HomeObject"
description = "Blob Store built on HomeReplication"
topics = ("ebay")
Expand Down
7 changes: 7 additions & 0 deletions src/lib/homestore_backend/hs_blob_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,9 @@ bool HSHomeObject::on_blob_put_pre_commit(int64_t lsn, sisl::blob const& header,
if (ctx) { ctx->promise_.setValue(folly::makeUnexpected(BlobError::SEALED_SHARD)); }
// we return false here, so on_blob_put_commit will not be called.
// instead, on_blob_put_rollback will be called.

// TODO: solo_repl_dev not check the returen value of pre_commit. this logic should be added to
// solo_repl_dev,if we get a false from pre_commit, we should call on_blob_put_rollback.
return false;
}
}
Expand Down Expand Up @@ -190,6 +193,10 @@ void HSHomeObject::on_blob_put_commit(int64_t lsn, sisl::blob const& header, sis
repl_result_ctx< BlobManager::Result< BlobInfo > >* ctx{nullptr};
if (hs_ctx != nullptr) {
ctx = boost::static_pointer_cast< repl_result_ctx< BlobManager::Result< BlobInfo > > >(hs_ctx).get();
if (ctx->promise_.isFulfilled()) {
LOGE("on_blob_put_commit promise is already fulfilled in pre_commit");
return;
}
}

auto msg_header = r_cast< ReplicationMessageHeader* >(header.bytes);
Expand Down
5 changes: 3 additions & 2 deletions src/lib/homestore_backend/hs_shard_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,9 @@ bool HSHomeObject::do_shard_message_pre_commit(int64_t lsn, ReplicationMessageHe
switch (header.msg_type) {
case ReplicationMessageType::SEAL_SHARD_MSG: {
// we can not release chunk here, since if rollback happens, we can not make sure we can get the same chunk.
// it might be selected by other creat_shard after we release it.
// we need to wait for the commit phase to release chunk;
// chunk selector will always return the a chunk of least used, and GC will happen at the time window
// we can not make sure we can get the same chunk as before, so we need to wait for the commit phase to release
// chunk;
update_shard_in_map(shard_info);
if (ctx) { ctx->promise_.setValue(ShardManager::Result< ShardInfo >(shard_info)); }
break;
Expand Down

0 comments on commit 63679a7

Please sign in to comment.