Skip to content

Commit

Permalink
Merge pull request #210 from raakella1/shutdown
Browse files Browse the repository at this point in the history
do not assert if repl application is null, shutdown might be in progress
  • Loading branch information
raakella1 authored Sep 9, 2024
2 parents 0ae3236 + 6705ed0 commit 1d4ef53
Show file tree
Hide file tree
Showing 4 changed files with 7 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.0"
version = "2.1.1"

homepage = "https://github.com/eBay/HomeObject"
description = "Blob Store built on HomeReplication"
Expand Down
3 changes: 3 additions & 0 deletions src/lib/homestore_backend/hs_blob_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ BlobManager::AsyncResult< blob_id_t > HSHomeObject::_put_blob(ShardInfo const& s
void HSHomeObject::on_blob_put_commit(int64_t lsn, sisl::blob const& header, sisl::blob const& key,
homestore::MultiBlkId const& pbas,
cintrusive< homestore::repl_req_ctx >& hs_ctx) {
LOGTRACEMOD(blobmgr, "blob put commit lsn:{}, pbas:{}", lsn, pbas.to_string());
repl_result_ctx< BlobManager::Result< BlobInfo > >* ctx{nullptr};
if (hs_ctx && hs_ctx->is_proposer()) {
ctx = boost::static_pointer_cast< repl_result_ctx< BlobManager::Result< BlobInfo > > >(hs_ctx).get();
Expand Down Expand Up @@ -208,6 +209,8 @@ void HSHomeObject::on_blob_put_commit(int64_t lsn, sisl::blob const& header, sis

// Write to index table with key {shard id, blob id } and value {pba}.
auto const [exist_already, status] = add_to_index_table(index_table, blob_info);
LOGTRACEMOD(blobmgr, "blob put commit blob_id: {}, lsn:{}, exist_already:{}, status:{}, pbas: {}", blob_id, lsn,
exist_already, status, pbas.to_string());
if (!exist_already) {
if (status != homestore::btree_status_t::success) {
LOGE("Failed to insert into index table for blob {} err {}", lsn, enum_name(status));
Expand Down
3 changes: 2 additions & 1 deletion src/lib/homestore_backend/hs_homeobject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ class HSReplApplication : public homestore::ReplApplication {
if (auto app = _ho_application.lock(); app) {
endpoint = fmt::format("{}{}", uri_prefix, app->lookup_peer(uuid));
} else {
RELEASE_ASSERT(false, "HomeObjectApplication lifetime unexpected!");
LOGW("HomeObjectApplication lifetime unexpected! Shutdown in progress?");
return {};
}

std::pair< std::string, uint16_t > host_port;
Expand Down
2 changes: 1 addition & 1 deletion src/lib/homestore_backend/hs_pg_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ void HSHomeObject::on_create_pg_message_commit(int64_t lsn, sisl::blob const& he
auto const* msg_header = r_cast< ReplicationMessageHeader const* >(header.cbytes());

if (msg_header->corrupted()) {
LOGE("create PG message header is corrupted , lsn:{}", lsn);
LOGE("create PG message header is corrupted , lsn:{}; header: {}", lsn, msg_header->to_string());
if (ctx) { ctx->promise_.setValue(folly::makeUnexpected(PGError::CRC_MISMATCH)); }
return;
}
Expand Down

0 comments on commit 1d4ef53

Please sign in to comment.