Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
acelyc111 committed Jul 22, 2024
1 parent 6f510ad commit 6bf4062
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/meta/meta_data.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,8 @@ bool construct_replica(meta_view view, const gpid &pid, int max_replica_count)
GET_HOST_PORTS(pc, last_drops, last_drops);
CHECK(last_drops.empty(), "last_drops of partition({}) must be empty", pid);
for (auto iter = drop_list.rbegin(); iter != drop_list.rend(); ++iter) {
if (last_drops.size() + 1 >= max_replica_count) {
// hp_last_drops is added in the steps bellow.
if (pc.hp_last_drops.size() + 1 >= max_replica_count) {
break;
}
// similar to cc.drop_list, pc.last_drop is also a stack structure
Expand Down
4 changes: 3 additions & 1 deletion src/runtime/rpc/rpc_host_port.h
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ class TProtocol;
auto &_obj = (obj); \
_obj.field.set_invalid(); \
_obj.hp_##field.reset(); \
_obj.__isset.hp_##field = false; \
} while (0)

// Clear the '<field>' and optional 'hp_<field>' of 'obj'. The types of the fields are std::vector
Expand All @@ -140,7 +141,8 @@ class TProtocol;
do { \
auto &_obj = (obj); \
_obj.field.clear(); \
_obj.__set_hp_##field({}); \
_obj.hp_##field.clear(); \
_obj.__isset.hp_##field = false; \
} while (0)

// Add 'addr' and 'hp' to the vector '<field>' and optional vector 'hp_<field>' of 'obj'. The types
Expand Down

0 comments on commit 6bf4062

Please sign in to comment.