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

client/router: fix the incorrect deep copy method in QueryRegion #9080

Merged
merged 1 commit into from
Feb 17, 2025

Conversation

JmPotato
Copy link
Member

@JmPotato JmPotato commented Feb 14, 2025

What problem does this PR solve?

Issue Number: ref #8690.

What is changed and how does it work?

Although #9055 identified the problem, the proposed fix is incorrect because the first request using the same region can still modify the data concurrently.
This PR resolves the issue by deep-copying the region from the response each time.

Check List

Tests

  • Unit test
  • Integration test
  • Manual test

Before:

After:

Release note

None.

@JmPotato JmPotato added the component/client Client logic. label Feb 14, 2025
@ti-chi-bot ti-chi-bot bot added release-note-none Denotes a PR that doesn't merit a release note. dco-signoff: yes Indicates the PR's author has signed the dco. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Feb 14, 2025
@ti-chi-bot ti-chi-bot bot added needs-1-more-lgtm Indicates a PR needs 1 more LGTM. approved labels Feb 14, 2025
@JmPotato JmPotato force-pushed the fix_convertToRegionCopy branch from d97471c to 33db286 Compare February 14, 2025 12:47
@ti-chi-bot ti-chi-bot bot added the lgtm label Feb 17, 2025
Copy link
Contributor

ti-chi-bot bot commented Feb 17, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: nolouch, rleungx

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 removed the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Feb 17, 2025
Copy link
Contributor

ti-chi-bot bot commented Feb 17, 2025

[LGTM Timeline notifier]

Timeline:

  • 2025-02-14 07:34:12.330636457 +0000 UTC m=+601094.726858519: ☑️ agreed by rleungx.
  • 2025-02-17 03:16:31.015965686 +0000 UTC m=+844833.412187748: ☑️ agreed by nolouch.

@JmPotato
Copy link
Member Author

/retest

Copy link

codecov bot commented Feb 17, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 76.23%. Comparing base (b7977dd) to head (33db286).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #9080      +/-   ##
==========================================
+ Coverage   76.20%   76.23%   +0.02%     
==========================================
  Files         468      468              
  Lines       71471    71463       -8     
==========================================
+ Hits        54462    54477      +15     
+ Misses      13595    13577      -18     
+ Partials     3414     3409       -5     
Flag Coverage Δ
unittests 76.23% <100.00%> (+0.02%) ⬆️

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

@ti-chi-bot ti-chi-bot bot merged commit 881b513 into tikv:master Feb 17, 2025
25 checks passed
@JmPotato JmPotato deleted the fix_convertToRegionCopy branch February 17, 2025 03:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved component/client Client logic. 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/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants