Skip to content

Commit

Permalink
Fix killing leader causing follower/learner core dump
Browse files Browse the repository at this point in the history
Signed-off-by: Jin Hai <[email protected]>
  • Loading branch information
JinHai-CN committed Dec 24, 2024
1 parent 4973930 commit 50ede97
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/network/peer_thrift_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,11 @@ void PeerClient::HeartBeat(HeartBeatPeerTask *peer_task) {
peer_task->error_code_ = static_cast<i64>(ErrorCode::kCantConnectLeader);
return;
}
case TTransportExceptionType::NOT_OPEN: {
peer_task->error_message_ = thrift_exception.what();
peer_task->error_code_ = static_cast<i64>(ErrorCode::kCantConnectLeader);
return;
}
default: {
String error_message = "Heartbeat: error happens when data transfer to leader";
UnrecoverableError(error_message);
Expand Down
2 changes: 1 addition & 1 deletion src/storage/io/s3_client_minio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ Status S3ClientMinio::BucketExists(const String &bucket_name) {
return Status::MinioInvalidAccessKey(resp.Error().String());
}
default: {
UnrecoverableError(fmt::format("Unable to do bucket existence check: {}", resp.Error().String()));
UnrecoverableError(fmt::format("Unable to do bucket existence check: {}, Please check if the MINIO connection", resp.Error().String()));
return Status::OK();
}
}
Expand Down

0 comments on commit 50ede97

Please sign in to comment.