Skip to content

Commit

Permalink
feat(split): ignore split garbage partition while load replicas (#787)
Browse files Browse the repository at this point in the history
  • Loading branch information
hycdong authored Mar 18, 2021
1 parent 83f18cc commit fc6093c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/replica/replica_init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,14 @@ error_code replica::initialize_on_load()
return nullptr;
}

if (info.partition_count < pidx) {
derror_f("partition[{}], count={}, this replica may be partition split garbage partition, "
"ignore it",
pid,
info.partition_count);
return nullptr;
}

replica *rep = new replica(stub, pid, info, dir, false);

err = rep->initialize_on_load();
Expand Down

0 comments on commit fc6093c

Please sign in to comment.