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

test: fix data conflict in TestCursorWillBlockMinStartTS #55326

Merged
merged 1 commit into from
Aug 9, 2024

Conversation

YangKeao
Copy link
Member

@YangKeao YangKeao commented Aug 9, 2024

What problem does this PR solve?

Issue Number: close #55227

Problem Summary:

There was a data conflict in the test, because the MemTracker is pre-allocated in the cache of StatementContext. If the StatementContext is re-used, the mem tracker will be cleaned..

What changed and how does it work?

Add a ServerStatusCursorExists flag. It makes sure the StatementContext will not be re-used.

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.

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. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Aug 9, 2024
Copy link

codecov bot commented Aug 9, 2024

Codecov Report

Attention: Patch coverage is 0% with 4 lines in your changes missing coverage. Please review.

Project coverage is 67.1137%. Comparing base (b066365) to head (a4e25dc).
Report is 1 commits behind head on master.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #55326        +/-   ##
================================================
- Coverage   74.7027%   67.1137%   -7.5890%     
================================================
  Files          1570       1570                
  Lines        364767     435632     +70865     
================================================
+ Hits         272491     292369     +19878     
- Misses        72509     122972     +50463     
- Partials      19767      20291       +524     
Flag Coverage Δ
integration 26.3721% <0.0000%> (?)

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

Components Coverage Δ
dumpling 55.1894% <ø> (ø)
parser ∅ <ø> (∅)
br 48.2506% <ø> (+0.6329%) ⬆️

@ti-chi-bot ti-chi-bot bot added approved needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Aug 9, 2024
Signed-off-by: Yang Keao <[email protected]>
@ti-chi-bot ti-chi-bot bot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Aug 9, 2024
Copy link

ti-chi-bot bot commented Aug 9, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hawkingrei, lcwangchao

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 [hawkingrei,lcwangchao]

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 Aug 9, 2024
Copy link

ti-chi-bot bot commented Aug 9, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-08-09 06:54:23.148110461 +0000 UTC m=+594193.015209550: ☑️ agreed by hawkingrei.
  • 2024-08-09 07:45:17.634067508 +0000 UTC m=+597247.501166596: ☑️ agreed by lcwangchao.

@ti-chi-bot ti-chi-bot bot merged commit 2c9a45c into pingcap:master Aug 9, 2024
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DATA RACE in the StatementContext
3 participants