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

stats: refine the behavior when updating stats delta #5647

Merged
merged 4 commits into from
Jan 16, 2018

Conversation

alivxxx
Copy link
Contributor

@alivxxx alivxxx commented Jan 15, 2018

Previously, when we updating the stats delta, there may be cases that:

  • tidb1 has inserted some data, but the stats delta has not been updated.

  • tidb2 deleted some data, then try to update the stats delta, it may fail because the count is not accurate and raise an error like BIGINT UNSIGNED value is out of range in '(mysql.stats_meta.count - 4)

This PR fixes this by checking the count before the update.

Copy link
Member

@hanfei1991 hanfei1991 left a comment

Choose a reason for hiding this comment

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

LGTM

@hanfei1991 hanfei1991 added the status/LGT1 Indicates that a PR has LGTM 1. label Jan 16, 2018
Copy link
Member

@zz-jason zz-jason left a comment

Choose a reason for hiding this comment

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

LGTM

@alivxxx
Copy link
Contributor Author

alivxxx commented Jan 16, 2018

/run-all-tests

@zimulala zimulala added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Jan 16, 2018
@alivxxx alivxxx merged commit 4345458 into pingcap:master Jan 16, 2018
@alivxxx alivxxx deleted the update branch January 16, 2018 10:43
alivxxx added a commit to alivxxx/tidb that referenced this pull request Feb 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/LGT2 Indicates that a PR has LGTM 2.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants