From c6009200b56c37f8baa19d24e1197fcb3473d3c3 Mon Sep 17 00:00:00 2001 From: Ryan Leung Date: Tue, 22 Oct 2024 16:21:35 +0800 Subject: [PATCH] fix Signed-off-by: Ryan Leung --- server/server.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/server/server.go b/server/server.go index a65c7c9254c..96e359e40d8 100644 --- a/server/server.go +++ b/server/server.go @@ -1419,7 +1419,14 @@ func (s *Server) GetRaftCluster() *cluster.RaftCluster { // IsServiceIndependent returns whether the service is independent. func (s *Server) IsServiceIndependent(name string) bool { - return s.mode == APIServiceMode && !s.IsClosed() && s.cluster.IsServiceIndependent(name) + if s.mode == APIServiceMode && !s.IsClosed() { + // TODO: remove it after we support tso discovery + if name == constant.TSOServiceName { + return true + } + return s.cluster.IsServiceIndependent(name) + } + return false } // DirectlyGetRaftCluster returns raft cluster directly.