Skip to content

Commit

Permalink
mcs/metastorage: remove the register restful API (#8583)
Browse files Browse the repository at this point in the history
ref #5836

Signed-off-by: husharp <ihusharp@gmail.com>
  • Loading branch information
HuSharp authored Sep 2, 2024
1 parent 09e272f commit 571c59b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
6 changes: 3 additions & 3 deletions pkg/mcs/metastorage/server/grpc_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 (*Service) RegisterRESTHandler(_ map[string]http.Handler) error {
// restful API is not implemented yet.
return nil
}

func (s *Service) checkServing() error {
Expand Down
4 changes: 2 additions & 2 deletions tools/pd-api-bench/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
```
2 changes: 0 additions & 2 deletions tools/pd-simulator/simulator/drive.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -280,7 +279,6 @@ func (d *Driver) RegionsHeartbeat(ctx context.Context) {
continue
}
nodesChannel[storeID] <- region.Clone()
report++
}
}

Expand Down

0 comments on commit 571c59b

Please sign in to comment.