diff --git a/pkg/mcs/metastorage/server/grpc_service.go b/pkg/mcs/metastorage/server/grpc_service.go index 4f43114ea29..77003c47b17 100644 --- a/pkg/mcs/metastorage/server/grpc_service.go +++ b/pkg/mcs/metastorage/server/grpc_service.go @@ -71,9 +71,9 @@ func (s *Service) RegisterGRPCService(g *grpc.Server) { } // RegisterRESTHandler registers the service to REST server. -func (s *Service) RegisterRESTHandler(userDefineHandlers map[string]http.Handler) error { - handler, group := SetUpRestHandler(s) - return apiutil.RegisterUserDefinedHandlers(userDefineHandlers, &group, handler) +func (s *Service) RegisterRESTHandler(_ map[string]http.Handler) error { + // restful API is not implemented yet. + return nil } func (s *Service) checkServing() error { diff --git a/tools/pd-api-bench/README.md b/tools/pd-api-bench/README.md index 019dbd5e6a3..76d568b3787 100644 --- a/tools/pd-api-bench/README.md +++ b/tools/pd-api-bench/README.md @@ -66,7 +66,7 @@ The api bench cases we support are as follows: You can run shell as follows. ```shell -go run main.go -http-cases GetRegionStatus-1+1,GetMinResolvedTS-1+1 -client 1 -debug true +go run main.go --http-cases GetRegionStatus-1+1,GetMinResolvedTS-1+1 --client 1 --debug true ``` ### TLS @@ -76,7 +76,7 @@ You can use the following command to generate a certificate for testing TLS: ```shell mkdir cert ./cert_opt.sh generate cert -go run main.go -http-cases GetRegionStatus-1+1,GetMinResolvedTS-1+1 -client 1 -debug true -cacert ./cert/ca.pem -cert ./cert/pd-server.pem -key ./cert/pd-server-key.pem +go run main.go --http-cases GetRegionStatus-1+1,GetMinResolvedTS-1+1 --client 1 --debug true --cacert ./cert/ca.pem --cert ./cert/pd-server.pem --key ./cert/pd-server-key.pem ./cert_opt.sh cleanup cert rm -rf cert ``` diff --git a/tools/pd-simulator/simulator/drive.go b/tools/pd-simulator/simulator/drive.go index 947d0664755..22d4175ecc6 100644 --- a/tools/pd-simulator/simulator/drive.go +++ b/tools/pd-simulator/simulator/drive.go @@ -266,7 +266,6 @@ func (d *Driver) RegionsHeartbeat(ctx context.Context) { healthyNodes[n.Store.GetId()] = true } } - report := 0 for _, region := range regions { hibernatePercent := d.simConfig.HibernatePercent // using rand(0,100) to meet hibernatePercent @@ -280,7 +279,6 @@ func (d *Driver) RegionsHeartbeat(ctx context.Context) { continue } nodesChannel[storeID] <- region.Clone() - report++ } }