Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
Signed-off-by: lhy1024 <[email protected]>
  • Loading branch information
lhy1024 committed Nov 12, 2024
1 parent 9c9e931 commit bc7428b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pkg/versioninfo/versioninfo.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ type Status struct {
Version string `json:"version"`
GitHash string `json:"git_hash"`
StartTimestamp int64 `json:"start_timestamp"`
Loaded bool `json:"loaded"`
RegionLoaded bool `json:"region_loaded"`
}

const (
Expand Down
2 changes: 1 addition & 1 deletion server/api/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ func (h *statusHandler) GetPDStatus(w http.ResponseWriter, _ *http.Request) {
GitHash: versioninfo.PDGitHash,
Version: versioninfo.PDReleaseVersion,
StartTimestamp: h.svr.StartTimestamp(),
Loaded: storage.AreRegionsLoaded(h.svr.GetStorage()),
RegionLoaded: storage.AreRegionsLoaded(h.svr.GetStorage()),
}

h.rd.JSON(w, http.StatusOK, version)
Expand Down
2 changes: 1 addition & 1 deletion server/api/status_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ func checkStatusResponse(re *require.Assertions, body []byte) {
re.Equal(versioninfo.PDBuildTS, got.BuildTS)
re.Equal(versioninfo.PDGitHash, got.GitHash)
re.Equal(versioninfo.PDReleaseVersion, got.Version)
re.Equal(false, got.Loaded)
re.False(got.RegionLoaded)
gotWithOldStatus := oldStatus{}
re.NoError(json.Unmarshal(body, &gotWithOldStatus))
re.Equal(versioninfo.PDBuildTS, gotWithOldStatus.BuildTS)
Expand Down

0 comments on commit bc7428b

Please sign in to comment.