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

table: fix the iterator of multi-valued index #48594

Merged
merged 1 commit into from
Nov 15, 2023

Conversation

tangenta
Copy link
Contributor

@tangenta tangenta commented Nov 14, 2023

What problem does this PR solve?

Issue Number: close #48304

Problem Summary:

Minimum reproducible step: #48304 (comment).

#48184 made the wrong assumption that multi-valued index must produce more than one result:

tidb/pkg/table/index.go

Lines 135 to 139 in 911334b

if len(iter.allIdxVals) == 0 {
val = iter.idxVals
} else {
val = iter.allIdxVals[iter.i]
}

However, for empty JSON slice, there is no result.

What is changed and how it works?

Pass isMultiValueIndex as parameter explicitly.

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No need to test
    • I checked and no code files have been changed.

Side effects

  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Breaking backward compatibility

Documentation

  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features
  • Changes MySQL compatibility

Release note

Please refer to Release Notes Language Style Guide to write a quality release note.

None

@ti-chi-bot ti-chi-bot bot added release-note-none Denotes a PR that doesn't merit a release note. do-not-merge/needs-triage-completed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Nov 14, 2023
Copy link

tiprow bot commented Nov 14, 2023

Hi @tangenta. Thanks for your PR.

PRs from untrusted users cannot be marked as trusted with /ok-to-test in this repo meaning untrusted PR authors can never trigger tests themselves. Collaborators can still trigger tests on the PR using /test all.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@ti-chi-bot ti-chi-bot bot added needs-cherry-pick-release-7.5 Should cherry pick this PR to release-7.5 branch. and removed do-not-merge/needs-triage-completed labels Nov 14, 2023
@ti-chi-bot ti-chi-bot bot added approved needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Nov 14, 2023
Copy link

codecov bot commented Nov 14, 2023

Codecov Report

Merging #48594 (1e2abe8) into master (911334b) will increase coverage by 1.7070%.
Report is 1 commits behind head on master.
The diff coverage is 100.0000%.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #48594        +/-   ##
================================================
+ Coverage   71.4298%   73.1369%   +1.7070%     
================================================
  Files          1404       1428        +24     
  Lines        407212     416523      +9311     
================================================
+ Hits         290871     304632     +13761     
+ Misses        96393      93042      -3351     
+ Partials      19948      18849      -1099     
Flag Coverage Δ
integration 43.7534% <100.0000%> (?)
unit 71.7452% <100.0000%> (+0.3154%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
dumpling 53.9874% <ø> (ø)
parser ∅ <ø> (∅)
br 48.8616% <ø> (-4.1968%) ⬇️

Copy link

ti-chi-bot bot commented Nov 15, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: wjhuang2016, ywqzzy

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Nov 15, 2023
Copy link

ti-chi-bot bot commented Nov 15, 2023

[LGTM Timeline notifier]

Timeline:

  • 2023-11-14 12:11:56.525309246 +0000 UTC m=+4164714.112419388: ☑️ agreed by wjhuang2016.
  • 2023-11-15 01:46:22.551665515 +0000 UTC m=+4213580.138775661: ☑️ agreed by ywqzzy.

Copy link

tiprow bot commented Nov 15, 2023

@tangenta: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
tiprow_fast_test 1e2abe8 link true /test tiprow_fast_test

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@ti-chi-bot ti-chi-bot bot merged commit 10b3e6a into pingcap:master Nov 15, 2023
14 of 16 checks passed
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-7.5: #48597.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm needs-cherry-pick-release-7.5 Should cherry pick this PR to release-7.5 branch. release-note-none Denotes a PR that doesn't merit a release note. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

admin check table report "Error 1105 (HY000): invalid data type: Unsupported datum flag 10 for Bytes vector"
4 participants