Samunroyu commented on code in PR #2328:
URL:
https://github.com/apache/incubator-pegasus/pull/2328#discussion_r2925617091
##########
src/meta/meta_data.cpp:
##########
@@ -134,13 +134,16 @@ bool construct_replica(meta_view view, const gpid &pid,
int max_replica_count)
// we put max_replica_count-1 recent replicas to last_drops, in case of
the DDD-state when the
// only primary dead
// when add node to pc.last_drops, we don't remove it from our cc.drop_list
- CHECK(pc.hp_last_drops.empty(), "last_drops of partition({}) must be
empty", pid);
+ std::vector<host_port> last_drops;
+ 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 (pc.hp_last_drops.size() + 1 >= max_replica_count) {
+ // hp_last_drops is added in the steps bellow.
+ if (last_drops.size() + 1 >= max_replica_count) {
Review Comment:
This pr refactes `pc.hp_xxx` to marcos.I think we shouldn't keep `pc.hp_xx`
in the server code.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]