diff --git a/pkg/versioninfo/versioninfo.go b/pkg/versioninfo/versioninfo.go index af93338fddd..5fca7e1698b 100644 --- a/pkg/versioninfo/versioninfo.go +++ b/pkg/versioninfo/versioninfo.go @@ -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 ( diff --git a/server/api/status.go b/server/api/status.go index 6548ba0f161..5b9e877aa1a 100644 --- a/server/api/status.go +++ b/server/api/status.go @@ -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) diff --git a/server/api/status_test.go b/server/api/status_test.go index c3db51b71df..221bce6160b 100644 --- a/server/api/status_test.go +++ b/server/api/status_test.go @@ -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)