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

Storages: Fix cloning delta index when there are duplicated tuples #9000

Merged
merged 7 commits into from
Apr 30, 2024

Conversation

JinheLin
Copy link
Contributor

@JinheLin JinheLin commented Apr 28, 2024

What problem does this PR solve?

Issue Number: close #8845

What is changed and how it works?

  1. Add a max_dup_tuple_id in DeltaTree.h.
  2. Record the max duplucated tuple id in DeltaPlace.h.
  3. Make sure the snapshot includes all duplicated tuples in the delta index when cloning the delta index in DeltaIndex.h.

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

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

Fix the potential issue that tiflash returns transient inconsistent results under high concurrent read

@ti-chi-bot ti-chi-bot bot added do-not-merge/needs-linked-issue release-note-none size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Apr 28, 2024
@JinheLin
Copy link
Contributor Author

Expected equality of these values:
count1
Which is: 118
count2
Which is: 128

@ti-chi-bot ti-chi-bot bot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Apr 29, 2024
@JinheLin JinheLin changed the title DNM: add test Storages: Fix cloning delta index when there are duplicated tuples Apr 29, 2024
@JinheLin JinheLin requested a review from CalvinNeo April 29, 2024 12:55
Copy link
Member

@CalvinNeo CalvinNeo left a comment

Choose a reason for hiding this comment

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

lgtm

@JaySon-Huang

This comment was marked as outdated.

Copy link
Contributor

@JaySon-Huang JaySon-Huang left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

ti-chi-bot bot commented Apr 30, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: CalvinNeo, JaySon-Huang

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:
  • OWNERS [CalvinNeo,JaySon-Huang]

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

Copy link
Contributor

ti-chi-bot bot commented Apr 30, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-04-29 14:13:10.389806709 +0000 UTC m=+280144.146942281: ☑️ agreed by CalvinNeo.
  • 2024-04-30 01:20:34.88026094 +0000 UTC m=+320188.637396513: ☑️ agreed by JaySon-Huang.

@purelind
Copy link
Collaborator

/hold

@ti-chi-bot ti-chi-bot bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 30, 2024
@purelind
Copy link
Collaborator

/unhold

@ti-chi-bot ti-chi-bot bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 30, 2024
@wuhuizuo
Copy link
Contributor

/hold

@ti-chi-bot ti-chi-bot bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 30, 2024
@wuhuizuo
Copy link
Contributor

/unhold

@ti-chi-bot ti-chi-bot bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 30, 2024
@ti-chi-bot ti-chi-bot merged commit 8e17009 into pingcap:master Apr 30, 2024
5 checks passed
ti-chi-bot pushed a commit to ti-chi-bot/tiflash that referenced this pull request Apr 30, 2024
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
@ti-chi-bot
Copy link
Member

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

@ti-chi-bot
Copy link
Member

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

ti-chi-bot pushed a commit to ti-chi-bot/tiflash that referenced this pull request Apr 30, 2024
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
ti-chi-bot pushed a commit to ti-chi-bot/tiflash that referenced this pull request Apr 30, 2024
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
@ti-chi-bot
Copy link
Member

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

ti-chi-bot pushed a commit to ti-chi-bot/tiflash that referenced this pull request Apr 30, 2024
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
@ti-chi-bot
Copy link
Member

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

ti-chi-bot bot pushed a commit that referenced this pull request Apr 30, 2024
JinheLin added a commit to ti-chi-bot/tiflash that referenced this pull request May 8, 2024
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
JaySon-Huang pushed a commit to ti-chi-bot/tiflash that referenced this pull request May 22, 2024
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
ti-chi-bot bot pushed a commit that referenced this pull request May 29, 2024
…9000) (#9016)

close #8845

Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>

Co-authored-by: jinhelin <linjinhe33@gmail.com>
ti-chi-bot bot added a commit that referenced this pull request May 29, 2024
…9000) (#9017)

close #8845

Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>

Co-authored-by: jinhelin <linjinhe33@gmail.com>
Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TiFlash result is not correct in consistency test
6 participants