From f00c4de31434884cc7b2bf9e7b295dfe5ce88e64 Mon Sep 17 00:00:00 2001 From: Jin Hai Date: Wed, 25 Dec 2024 11:20:47 +0800 Subject: [PATCH] Fix killing leader causing follower/learner core dump (#2406) ### 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 --- src/network/peer_thrift_client.cpp | 5 +++++ src/storage/io/s3_client_minio.cpp | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/network/peer_thrift_client.cpp b/src/network/peer_thrift_client.cpp index dfb631a3dd..933dfd8a16 100644 --- a/src/network/peer_thrift_client.cpp +++ b/src/network/peer_thrift_client.cpp @@ -337,6 +337,11 @@ void PeerClient::HeartBeat(HeartBeatPeerTask *peer_task) { peer_task->error_code_ = static_cast(ErrorCode::kCantConnectLeader); return; } + case TTransportExceptionType::NOT_OPEN: { + peer_task->error_message_ = thrift_exception.what(); + peer_task->error_code_ = static_cast(ErrorCode::kCantConnectLeader); + return; + } default: { String error_message = "Heartbeat: error happens when data transfer to leader"; UnrecoverableError(error_message); diff --git a/src/storage/io/s3_client_minio.cpp b/src/storage/io/s3_client_minio.cpp index 17ef0467fb..a512b87aff 100644 --- a/src/storage/io/s3_client_minio.cpp +++ b/src/storage/io/s3_client_minio.cpp @@ -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(); } }