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

executor: fix invalid key error of fast analyze #11072

Merged
merged 3 commits into from Jul 4, 2019

Conversation

Projects
None yet
3 participants
@lamxTyler
Copy link
Member

commented Jul 4, 2019

What problem does this PR solve?

[18:6]invalid key - ""
github.com/pingcap/errors.AddStack
        /home/go/pkg/mod/github.com/pingcap/errors@v0.11.4/errors.go:174
github.com/pingcap/parser/terror.(*Error).GenWithStack
        /home/go/pkg/mod/github.com/pingcap/parser@v0.0.0-20190613082312-d2cf6071823d/terror/terror.go:231
github.com/pingcap/tidb/tablecodec.DecodeRowKey
        /home/go/src/github.com/pingcap/tidb/tablecodec/tablecodec.go:205
github.com/pingcap/tidb/executor.(*AnalyzeFastExec).updateCollectorSamples
        /home/go/src/github.com/pingcap/tidb/executor/analyze.go:801
github.com/pingcap/tidb/executor.(*AnalyzeFastExec).handleBatchSeekResponse
        /home/go/src/github.com/pingcap/tidb/executor/analyze.go:872
github.com/pingcap/tidb/executor.(*AnalyzeFastExec).handleSampTasks
        /home/go/src/github.com/pingcap/tidb/executor/analyze.go:968

What is changed and how it works?

We should check the validity of iterator before using them.

Check List

Tests

  • Unit test

Code changes

  • Has exported function/method change

Side effects

  • None

Related changes

  • Need to cherry-pick to the release branch
@codecov

This comment has been minimized.

Copy link

commented Jul 4, 2019

Codecov Report

Merging #11072 into master will decrease coverage by 0.0292%.
The diff coverage is 100%.

@@               Coverage Diff                @@
##             master     #11072        +/-   ##
================================================
- Coverage   80.9685%   80.9393%   -0.0293%     
================================================
  Files           419        418         -1     
  Lines         89326      89194       -132     
================================================
- Hits          72326      72193       -133     
+ Misses        11767      11759         -8     
- Partials       5233       5242         +9
@codecov

This comment has been minimized.

Copy link

commented Jul 4, 2019

Codecov Report

Merging #11072 into master will not change coverage.
The diff coverage is n/a.

@@             Coverage Diff             @@
##             master     #11072   +/-   ##
===========================================
  Coverage   81.2155%   81.2155%           
===========================================
  Files           419        419           
  Lines         90117      90117           
===========================================
  Hits          73189      73189           
  Misses        11656      11656           
  Partials       5272       5272
@lzmhhh123
Copy link
Member

left a comment

LGTM.

@zz-jason
Copy link
Member

left a comment

LGTM

@lamxTyler

This comment has been minimized.

Copy link
Member Author

commented Jul 4, 2019

/run-all-tests

@lamxTyler

This comment has been minimized.

Copy link
Member Author

commented Jul 4, 2019

/run-integration-common-test

1 similar comment
@lamxTyler

This comment has been minimized.

Copy link
Member Author

commented Jul 4, 2019

/run-integration-common-test

@lamxTyler

This comment has been minimized.

Copy link
Member Author

commented Jul 4, 2019

/run-all-tests

@lamxTyler lamxTyler merged commit 9eb2379 into pingcap:master Jul 4, 2019

13 of 14 checks passed

ci/circleci Your tests are queued behind your running builds
Details
idc-jenkins-ci-tidb/build Jenkins job succeeded.
Details
idc-jenkins-ci-tidb/build_check_race Jenkins job succeeded.
Details
idc-jenkins-ci-tidb/check_dev Jenkins job succeeded.
Details
idc-jenkins-ci-tidb/check_dev_2 Jenkins job succeeded.
Details
idc-jenkins-ci-tidb/common-test job succeeded
Details
idc-jenkins-ci-tidb/integration-common-test Jenkins job succeeded.
Details
idc-jenkins-ci-tidb/integration-compatibility-test Jenkins job succeeded.
Details
idc-jenkins-ci-tidb/integration-ddl-test Jenkins job succeeded.
Details
idc-jenkins-ci-tidb/mybatis-test job succeeded
Details
idc-jenkins-ci-tidb/sqllogic-test-1 Jenkins job succeeded.
Details
idc-jenkins-ci-tidb/sqllogic-test-2 Jenkins job succeeded.
Details
idc-jenkins-ci-tidb/unit-test Jenkins job succeeded.
Details
license/cla Contributor License Agreement is signed.
Details

@lamxTyler lamxTyler deleted the lamxTyler:invalid branch Jul 4, 2019

lamxTyler added a commit to lamxTyler/tidb that referenced this pull request Jul 5, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.