From 2e8acc2a95e51cebc76dd9b59806132143ac8801 Mon Sep 17 00:00:00 2001 From: Ryan Leung Date: Thu, 9 Jan 2025 14:02:22 +0800 Subject: [PATCH] add TODO Signed-off-by: Ryan Leung --- server/server.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/server/server.go b/server/server.go index 4ebc43d2388..8e6e3422977 100644 --- a/server/server.go +++ b/server/server.go @@ -239,6 +239,14 @@ type HandlerBuilder func(context.Context, *Server) (http.Handler, apiutil.APISer // CreateServer creates the UNINITIALIZED pd server with given configuration. func CreateServer(ctx context.Context, cfg *config.Config, services []string, legacyServiceBuilders ...HandlerBuilder) (*Server, error) { + // TODO: Currently, whether we enable microservice or not is determined by the service list. + // It's equal to whether we enable the keyspace group or not. + // But indeed the keyspace group is independent of the microservice. + // There could be the following scenarios: + // 1. Enable microservice but disable keyspace group. (non-serverless scenario) + // 2. Enable microservice and enable keyspace group. (serverless scenario) + // 3. Disable microservice and disable keyspace group. (both serverless scenario and non-serverless scenario) + // We should separate the keyspace group from the microservice later. isKeyspaceGroupEnabled := len(services) != 0 log.Info("PD config", zap.Bool("enable-keyspace-group", isKeyspaceGroupEnabled), zap.Reflect("config", cfg)) serviceMiddlewareCfg := config.NewServiceMiddlewareConfig()