Skip to content

Commit

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

Signed-off-by: husharp <jinhao.hu@pingcap.com>
  • Loading branch information
HuSharp committed Mar 21, 2024
1 parent 89a8087 commit 7ec0058
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
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
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 7ec0058

Please sign in to comment.