Skip to content

Commit

Permalink
Fix killing leader causing follower/learner core dump (#2406)
Browse files Browse the repository at this point in the history
### What problem does this PR solve?

As title

Issue link:#2399

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)

Signed-off-by: Jin Hai <[email protected]>
  • Loading branch information
JinHai-CN authored Dec 25, 2024
1 parent 4973930 commit f00c4de
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 f00c4de

Please sign in to comment.