From fecffc93e46dbceac76f5d5e8b3f16cdd67941df Mon Sep 17 00:00:00 2001 From: Jingyu Zhou Date: Fri, 17 May 2024 10:53:11 -0700 Subject: [PATCH] Fix a segfault when tlog encounters platform_error During destruction, rejoinClusterController actor should be cancelled to avoid accessing TLogData object. --- fdbserver/TLogServer.actor.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/fdbserver/TLogServer.actor.cpp b/fdbserver/TLogServer.actor.cpp index b86bb901bc..2f055d5f13 100644 --- a/fdbserver/TLogServer.actor.cpp +++ b/fdbserver/TLogServer.actor.cpp @@ -2548,6 +2548,10 @@ ACTOR Future rejoinClusterController(TLogData* self, stoppedPromise.send(Void()); } + if (self->terminated.isSet()) { + return Void(); + } + if (registerWithCC.isReady()) { if (!lastMasterLifetime.isEqual(self->dbInfo->get().masterLifetime)) { // The TLogRejoinRequest is needed to establish communications with a new master, which doesn't have our