Skip to content

Commit

Permalink
replication: add acid_consistant flag in HTTP response (#4961)
Browse files Browse the repository at this point in the history
fix #4940, close #4940

Signed-off-by: disksing <i@disksing.com>
  • Loading branch information
disksing authored May 22, 2022
1 parent 2cced16 commit 9f10a51
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions server/replication/replication_mode.go
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ type HTTPReplicationStatus struct {
LabelKey string `json:"label_key"`
State string `json:"state"`
StateID uint64 `json:"state_id,omitempty"`
ACIDConsistent bool `json:"acid_consistent"`
TotalRegions int `json:"total_regions,omitempty"`
SyncedRegions int `json:"synced_regions,omitempty"`
RecoverProgress float32 `json:"recover_progress,omitempty"`
Expand All @@ -195,6 +196,7 @@ func (m *ModeManager) GetReplicationStatusHTTP() *HTTPReplicationStatus {
status.DrAutoSync.LabelKey = m.config.DRAutoSync.LabelKey
status.DrAutoSync.State = m.drAutoSync.State
status.DrAutoSync.StateID = m.drAutoSync.StateID
status.DrAutoSync.ACIDConsistent = m.drAutoSync.State != drStateSyncRecover
status.DrAutoSync.RecoverProgress = m.drAutoSync.RecoverProgress
status.DrAutoSync.TotalRegions = m.drAutoSync.TotalRegions
status.DrAutoSync.SyncedRegions = m.drAutoSync.SyncedRegions
Expand Down

0 comments on commit 9f10a51

Please sign in to comment.