Skip to content

Commit

Permalink
add TODO
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Leung <[email protected]>
  • Loading branch information
rleungx committed Jan 9, 2025
1 parent 114d008 commit 2e8acc2
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 2e8acc2

Please sign in to comment.