Skip to content

test: fix the test failure that clear_regions_in_written may be called twice (#17798)#17800

Merged
ti-chi-bot[bot] merged 2 commits intotikv:release-8.5from
ti-chi-bot:cherry-pick-17798-to-release-8.5
Nov 11, 2024
Merged

test: fix the test failure that clear_regions_in_written may be called twice (#17798)#17800
ti-chi-bot[bot] merged 2 commits intotikv:release-8.5from
ti-chi-bot:cherry-pick-17798-to-release-8.5

Conversation

@ti-chi-bot
Copy link
Member

This is an automated cherry-pick of #17798

What is changed and how it works?

Issue Number: Close #17797

What's Changed:

If the last call `prepare_for_region` returns `NotInCache`,
`clear_written_regions` can be called twice in both `write_impl` and
`clear`, which will cause panic. This pr changes `clear_written_regions`
to consume `self.written_regions`to avoid this kind of duplicate clear.

Related changes

  • PR to update pingcap/docs/pingcap/docs-cn:
  • Need to cherry-pick to the release branch

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

Release note

None

@ti-chi-bot ti-chi-bot added dco-signoff: yes Indicates the PR's author has signed the dco. release-note-none Denotes a PR that doesn't merit a release note. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. type/cherry-pick-for-release-8.5 This PR is cherry-picked to release-8.5 from a source PR. labels Nov 11, 2024
@glorv glorv requested a review from SpadeA-Tang November 11, 2024 07:59
@ti-chi-bot ti-chi-bot bot added the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Nov 11, 2024
@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Nov 11, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: glorv, SpadeA-Tang

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

The pull request process is described here

Details 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 approved lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Nov 11, 2024
@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Nov 11, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-11-11 08:00:31.344442571 +0000 UTC m=+256793.535311563: ☑️ agreed by SpadeA-Tang.
  • 2024-11-11 08:00:37.411639541 +0000 UTC m=+256799.602508537: ☑️ agreed by glorv.

@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Nov 11, 2024

@ti-chi-bot: Your PR was out of date, I have automatically updated it for you.

If the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes.

Details

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 ti-community-infra/tichi repository.

@ti-chi-bot ti-chi-bot bot merged commit 6f9864e into tikv:release-8.5 Nov 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved cherry-pick-approved Cherry pick PR approved by release team. dco-signoff: yes Indicates the PR's author has signed the dco. lgtm release-note-none Denotes a PR that doesn't merit a release note. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. type/cherry-pick-for-release-8.5 This PR is cherry-picked to release-8.5 from a source PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants