Skip to content

Commit

Permalink
fix: core dump when restart meta
Browse files Browse the repository at this point in the history
  • Loading branch information
cyz-2023 committed Nov 6, 2024
1 parent 5b1f1ab commit 6206448
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/meta_server/meta_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -552,6 +552,13 @@ void MetaServer::raft_control(google::protobuf::RpcController* controller,
pb::RaftControlResponse* response,
google::protobuf::Closure* done) {
brpc::ClosureGuard done_guard(done);
brpc::Controller* cntl =
static_cast<brpc::Controller*>(controller);
uint64_t log_id = 0;
if (cntl->has_log_id()) {
log_id = cntl->log_id();
}
RETURN_IF_NOT_INIT(_init_success, response, log_id);
if (request->region_id() == 0) {
_meta_state_machine->raft_control(controller, request, response, done_guard.release());
return;
Expand Down

0 comments on commit 6206448

Please sign in to comment.