diff --git a/cdc/api/v2/changefeed.go b/cdc/api/v2/changefeed.go index cd88fe57643..861492bd68c 100644 --- a/cdc/api/v2/changefeed.go +++ b/cdc/api/v2/changefeed.go @@ -1002,12 +1002,12 @@ func (h *OpenAPIV2) synced(c *gin.Context) { var message string if (oracle.ExtractPhysical(status.PullerResolvedTs) - oracle.ExtractPhysical(status.CheckpointTs)) < cfg.ReplicaConfig.SyncedStatus.CheckpointInterval*1000 { - message = fmt.Sprintf("Please check whether pd is healthy and tikv region is all available. " + - "If pd is not healthy or tikv region is not available, the data syncing is finished. " + - "When pd is offline means that pd is not healthy. For tikv region, you can check the grafana info " + - "in 'TiKV-Details-Resolved-Ts-Max Leader Resolved TS gap'. If the gap is a large value, such as a few minutes, " + - "it means some regions in tikv are unavailable. " + - " Otherwise the data syncing is not finished, please wait") + message = fmt.Sprintf("Please check whether PD is online and TiKV Regions are all available. " + + "If PD is offline or some TiKV regions are not available, it means that the data syncing process is complete. " + + "To check whether TiKV regions are all available, you can view " + + "'TiKV-Details' > 'Resolved-Ts' > 'Max Leader Resolved TS gap' on Grafana. " + + "If the gap is large, such as a few minutes, it means that some regions in TiKV are unavailable. " + + "Otherwise, if the gap is small and PD is online, it means the data syncing is incomplete, so please wait") } else { message = "The data syncing is not finished, please wait" } diff --git a/cdc/api/v2/changefeed_test.go b/cdc/api/v2/changefeed_test.go index 4348fcef612..39afc0b0d0b 100644 --- a/cdc/api/v2/changefeed_test.go +++ b/cdc/api/v2/changefeed_test.go @@ -1115,12 +1115,12 @@ func TestChangefeedSynced(t *testing.T) { err := json.NewDecoder(w.Body).Decode(&resp) require.Nil(t, err) require.Equal(t, false, resp.Synced) - require.Equal(t, "Please check whether pd is healthy and tikv region is all available. "+ - "If pd is not healthy or tikv region is not available, the data syncing is finished. "+ - "When pd is offline means that pd is not healthy. For tikv region, you can check the grafana info "+ - "in 'TiKV-Details-Resolved-Ts-Max Leader Resolved TS gap'. If the gap is a large value, such as a few minutes, "+ - "it means some regions in tikv are unavailable. "+ - " Otherwise the data syncing is not finished, please wait", resp.Info) + require.Equal(t, "Please check whether PD is online and TiKV Regions are all available. "+ + "If PD is offline or some TiKV regions are not available, it means that the data syncing process is complete. "+ + "To check whether TiKV regions are all available, you can view "+ + "'TiKV-Details' > 'Resolved-Ts' > 'Max Leader Resolved TS gap' on Grafana. "+ + "If the gap is large, such as a few minutes, it means that some regions in TiKV are unavailable. "+ + "Otherwise, if the gap is small and PD is online, it means the data syncing is incomplete, so please wait", resp.Info) } { diff --git a/tests/integration_tests/synced_status/run.sh b/tests/integration_tests/synced_status/run.sh index 04f55009dad..6b7fb4d0a05 100644 --- a/tests/integration_tests/synced_status/run.sh +++ b/tests/integration_tests/synced_status/run.sh @@ -176,12 +176,12 @@ function run_case_with_unavailable_tikv() { exit 1 fi info=$(echo $synced_status | jq -r '.info') - target_message="Please check whether pd is healthy and tikv region is all available. \ -If pd is not healthy or tikv region is not available, the data syncing is finished. \ -When pd is offline means that pd is not healthy. For tikv region, you can check the grafana info \ -in 'TiKV-Details-Resolved-Ts-Max Leader Resolved TS gap'. If the gap is a large value, such as a few minutes, \ -it means some regions in tikv are unavailable. \ -Otherwise the data syncing is not finished, please wait" + target_message="Please check whether PD is online and TiKV Regions are all available. \ +If PD is offline or some TiKV regions are not available, it means that the data syncing process is complete. \ +To check whether TiKV regions are all available, you can view \ +'TiKV-Details' > 'Resolved-Ts' > 'Max Leader Resolved TS gap' on Grafana. \ +If the gap is large, such as a few minutes, it means that some regions in TiKV are unavailable. \ +Otherwise, if the gap is small and PD is online, it means the data syncing is incomplete, so please wait" if [ "$info" != "$target_message" ]; then echo "synced status info is not correct" @@ -275,12 +275,12 @@ function run_case_with_failpoint() { exit 1 fi info=$(echo $synced_status | jq -r '.info') - target_message="Please check whether pd is healthy and tikv region is all available. \ -If pd is not healthy or tikv region is not available, the data syncing is finished. \ -When pd is offline means that pd is not healthy. For tikv region, you can check the grafana info \ -in 'TiKV-Details-Resolved-Ts-Max Leader Resolved TS gap'. If the gap is a large value, such as a few minutes, \ -it means some regions in tikv are unavailable. \ -Otherwise the data syncing is not finished, please wait" + target_message="Please check whether PD is online and TiKV Regions are all available. \ +If PD is offline or some TiKV regions are not available, it means that the data syncing process is complete. \ +To check whether TiKV regions are all available, you can view \ +'TiKV-Details' > 'Resolved-Ts' > 'Max Leader Resolved TS gap' on Grafana. \ +If the gap is large, such as a few minutes, it means that some regions in TiKV are unavailable. \ +Otherwise, if the gap is small and PD is online, it means the data syncing is incomplete, so please wait" if [ "$info" != "$target_message" ]; then echo "synced status info is not correct" exit 1