Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

client: skip update backward safets #393

Merged
merged 2 commits into from
Dec 13, 2021
Merged

Conversation

Yisaer
Copy link
Contributor

@Yisaer Yisaer commented Dec 13, 2021

Signed-off-by: yisaer disxiaofei@163.com

During tikv restarted, the safeTS might be 0 in a short period. This requests forbid tidb update backward safets.

Signed-off-by: yisaer <disxiaofei@163.com>
@@ -540,6 +540,11 @@ func (s *KVStore) updateSafeTS(ctx context.Context) {
return
}
safeTS := resp.Resp.(*kvrpcpb.StoreSafeTSResponse).GetSafeTs()
preSafeTS := s.getSafeTS(storeID)
if preSafeTS > safeTS {
metrics.TiKVSafeTSUpdateCounter.WithLabelValues("skip", storeIDStr).Inc()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need to record TiKVMinSafeTSGapSeconds?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated.

Signed-off-by: yisaer <disxiaofei@163.com>
@disksing disksing merged commit b147ced into tikv:master Dec 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants