Skip to content

Conversation

rleungx
Copy link
Member

@rleungx rleungx commented Apr 21, 2023

What problem does this PR solve?

Issue Number: Close #6355.

What is changed and how does it work?

Previously, we use txn to save timestamps. But if the timestamp is equal to or less than the previous one, we only return nil, which may cause memory to have an inconsistent state. This PR returns an error in such a case.

Check List

Tests

  • Unit test

Release note

None.

@ti-chi-bot
Copy link
Member

ti-chi-bot commented Apr 21, 2023

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • JmPotato
  • lhy1024

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

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

Reviewer can indicate their review by submitting an approval review.
Reviewer can cancel approval by submitting a request changes review.

@ti-chi-bot ti-chi-bot added status/LGT1 Indicates that a PR has LGTM 1. needs-cherry-pick-release-7.1 Should cherry pick this PR to release-7.1 branch. and removed do-not-merge/needs-triage-completed labels Apr 21, 2023
@rleungx rleungx marked this pull request as draft April 21, 2023 08:03
@ti-chi-bot ti-chi-bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 21, 2023
@rleungx
Copy link
Member Author

rleungx commented Apr 21, 2023

/check-issue-triage-complete

Signed-off-by: Ryan Leung <rleungx@gmail.com>
@rleungx rleungx marked this pull request as ready for review April 21, 2023 08:17
@ti-chi-bot ti-chi-bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 21, 2023
@rleungx rleungx requested a review from lhy1024 April 21, 2023 08:26
@lhy1024
Copy link
Contributor

lhy1024 commented Apr 21, 2023

lgtm

@codecov
Copy link

codecov bot commented Apr 21, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: -0.11 ⚠️

Comparison is base (93b45a7) 75.22% compared to head (d321aed) 75.12%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6354      +/-   ##
==========================================
- Coverage   75.22%   75.12%   -0.11%     
==========================================
  Files         408      408              
  Lines       40512    40512              
==========================================
- Hits        30476    30433      -43     
- Misses       7398     7432      +34     
- Partials     2638     2647       +9     
Flag Coverage Δ
unittests 75.12% <100.00%> (-0.11%) ⬇️

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

Impacted Files Coverage Δ
pkg/storage/endpoint/tso.go 90.32% <100.00%> (ø)

... and 27 files with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@ti-chi-bot ti-chi-bot added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Apr 21, 2023
@rleungx
Copy link
Member Author

rleungx commented Apr 21, 2023

/merge

@ti-chi-bot
Copy link
Member

@rleungx: It seems you want to merge this PR, I will help you trigger all the tests:

/run-all-tests

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
Copy link
Member

This pull request has been accepted and is ready to merge.

Commit hash: d321aed

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Apr 21, 2023
@ti-chi-bot ti-chi-bot merged commit 4b8162f into tikv:master Apr 21, 2023
@rleungx rleungx deleted the fix-tso branch April 21, 2023 08:33
@ti-chi-bot
Copy link
Member

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

ti-chi-bot added a commit that referenced this pull request Apr 21, 2023
ref #6354, close #6355

Signed-off-by: Ryan Leung <rleungx@gmail.com>

Co-authored-by: Ryan Leung <rleungx@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-cherry-pick-release-7.1 Should cherry pick this PR to release-7.1 branch. release-note-none Denotes a PR that doesn't merit a release note. status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TSO could be inconsistent between memory and etcd
4 participants