Skip to content

Commit

Permalink
add current leader if error is NOT_LEADER
Browse files Browse the repository at this point in the history
  • Loading branch information
yawzhang committed Dec 3, 2024
1 parent 89f32a6 commit 333fdfc
Show file tree
Hide file tree
Showing 2 changed files with 3 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.13"
version = "2.1.14"

homepage = "https://github.com/eBay/HomeObject"
description = "Blob Store built on HomeReplication"
Expand Down
4 changes: 2 additions & 2 deletions src/lib/homestore_backend/hs_blob_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ BlobManager::AsyncResult< blob_id_t > HSHomeObject::_put_blob(ShardInfo const& s

if (!repl_dev->is_leader()) {
LOGW("failed to put blob for pg [{}], shard [{}], not leader", pg_id, shard.id);
return folly::makeUnexpected(BlobErrorCode::NOT_LEADER);
return folly::makeUnexpected(BlobError(BlobErrorCode::NOT_LEADER, repl_dev->get_leader_id()));
}

// Create a put_blob request which allocates for header, key and blob_header, user_key. Data sgs are added later
Expand Down Expand Up @@ -378,7 +378,7 @@ BlobManager::NullAsyncResult HSHomeObject::_del_blob(ShardInfo const& shard, blo

if (!repl_dev->is_leader()) {
LOGW("failed to del blob for pg [{}], shard [{}], blob_id [{}], not leader", pg_id, shard.id, blob_id);
return folly::makeUnexpected(BlobErrorCode::NOT_LEADER);
return folly::makeUnexpected(BlobError(BlobErrorCode::NOT_LEADER, repl_dev->get_leader_id()));
}

// Create an unaligned header request unaligned
Expand Down

0 comments on commit 333fdfc

Please sign in to comment.