Skip to content

Commit

Permalink
mcs: fix micro-service topo's display (#7956) (#7958)
Browse files Browse the repository at this point in the history
close #7957

Signed-off-by: husharp <[email protected]>

Co-authored-by: husharp <[email protected]>
  • Loading branch information
ti-chi-bot and HuSharp authored Mar 21, 2024
1 parent 320bcba commit 92a303c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion pkg/mcs/scheduling/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import (
"net/http"
"os"
"os/signal"
"path/filepath"
"runtime"
"strconv"
"sync"
Expand Down Expand Up @@ -413,7 +414,8 @@ func (s *Server) startServer() (err error) {
// different service modes provided by the same pd-server binary
bs.ServerInfoGauge.WithLabelValues(versioninfo.PDReleaseVersion, versioninfo.PDGitHash).Set(float64(time.Now().Unix()))
bs.ServerMaxProcsGauge.Set(float64(runtime.GOMAXPROCS(0)))
deployPath, err := os.Executable()
execPath, err := os.Executable()
deployPath := filepath.Dir(execPath)
if err != nil {
deployPath = ""
}
Expand Down
4 changes: 3 additions & 1 deletion pkg/mcs/tso/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import (
"net/http"
"os"
"os/signal"
"path/filepath"
"runtime"
"strconv"
"sync"
Expand Down Expand Up @@ -368,7 +369,8 @@ func (s *Server) startServer() (err error) {
s.serverLoopCtx, s.serverLoopCancel = context.WithCancel(s.Context())
legacySvcRootPath := endpoint.LegacyRootPath(s.clusterID)
tsoSvcRootPath := endpoint.TSOSvcRootPath(s.clusterID)
deployPath, err := os.Executable()
execPath, err := os.Executable()
deployPath := filepath.Dir(execPath)
if err != nil {
deployPath = ""
}
Expand Down

0 comments on commit 92a303c

Please sign in to comment.