Skip to content

Commit 77ba5c6

Browse files
yuwmaoyuwmao
andauthored
SDSTOR-21764: Expose custom commit_quorum (#406)
Co-authored-by: yuwmao <yuwmao@ebaychina.com>
1 parent 5cb5144 commit 77ba5c6

3 files changed

Lines changed: 4 additions & 1 deletion

File tree

conanfile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
class HomeObjectConan(ConanFile):
1212
name = "homeobject"
13-
version = "4.1.5"
13+
version = "4.1.6"
1414

1515
homepage = "https://github.com/eBay/HomeObject"
1616
description = "Blob Store built on HomeStore"

src/include/homeobject/pg_manager.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ struct PGStats {
123123
uint64_t num_tombstone_objects; // total number of tombstone objects on this PG;
124124
uint64_t pg_state; // PG state;
125125
uint32_t snp_progress; // snapshot progress, the value is set only when the peer is under baseline resync.
126+
uint32_t commit_quorum; // custom commit quorum size; 0 means default majority-based quorum.
126127
std::vector< peer_info > members;
127128

128129
PGStats() :
@@ -139,6 +140,7 @@ struct PGStats {
139140
num_tombstone_objects{0},
140141
pg_state{0},
141142
snp_progress{0},
143+
commit_quorum{0},
142144
members{} {}
143145

144146
std::string to_string() {

src/lib/homestore_backend/hs_pg_manager.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1148,6 +1148,7 @@ bool HSHomeObject::_get_stats(pg_id_t id, PGStats& stats) const {
11481148
stats.num_tombstone_objects = hs_pg->durable_entities().tombstone_blob_count.load(std::memory_order_relaxed);
11491149

11501150
hs_pg->get_peer_info(stats.members);
1151+
stats.commit_quorum = hs_pg->repl_dev_->get_custom_commit_quorum();
11511152

11521153
stats.avail_open_shards = chunk_selector()->avail_num_chunks(hs_pg->pg_info_.id);
11531154
stats.avail_bytes = chunk_selector()->avail_blks(hs_pg->pg_info_.id) * blk_size;

0 commit comments

Comments
 (0)