Skip to content

Try to validate read ts for all RPC requests (#1513)#1549

Merged
ti-chi-bot[bot] merged 4 commits intotikv:tidb-8.5from
you06:verify-read-ts/8.5
Jan 13, 2025
Merged

Try to validate read ts for all RPC requests (#1513)#1549
ti-chi-bot[bot] merged 4 commits intotikv:tidb-8.5from
you06:verify-read-ts/8.5

Conversation

@you06
Copy link
Contributor

@you06 you06 commented Jan 7, 2025

Cherry pick #1513 and #1533 to tidb-8.5.

MyonKeminta and others added 2 commits January 7, 2025 12:16
Signed-off-by: MyonKeminta <MyonKeminta@users.noreply.github.com>
 

Signed-off-by: you06 <you1474600@gmail.com>
@ti-chi-bot ti-chi-bot bot added dco-signoff: yes Indicates the PR's author has signed the dco. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Jan 7, 2025
you06 added 2 commits January 7, 2025 16:40
Signed-off-by: you06 <you1474600@gmail.com>
Signed-off-by: you06 <you1474600@gmail.com>
@ti-chi-bot ti-chi-bot bot added needs-1-more-lgtm Indicates a PR needs 1 more LGTM. approved labels Jan 8, 2025
@ekexium ekexium requested a review from MyonKeminta January 9, 2025 04:56
if !exists || readTS > latestTSInfo.tso {
currentTS, err := o.getCurrentTSForValidation(ctx, opt)
if err != nil {
return errors.Errorf("fail to validate read timestamp: %v", err)
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe attach more information here as the read request would be rejected in this case?

Copy link
Contributor

Choose a reason for hiding this comment

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

The log didn't exist in master branch. I think it's better to add it to master first and then cherry-pick it if necessary.

Copy link
Contributor

@cfzjywxk cfzjywxk Jan 13, 2025

Choose a reason for hiding this comment

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

If this branch is reached, the user client may receive this error. Is this situation always unexpected? Could it lead to false-positive judgments or similar issues?

I understand that it is indeed unexpected because each PD fetched timestamp will update the last TS first, Do I understand right?

@ti-chi-bot ti-chi-bot bot added the lgtm label Jan 13, 2025
@ti-chi-bot
Copy link

ti-chi-bot bot commented Jan 13, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ekexium, MyonKeminta

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:
  • OWNERS [MyonKeminta,ekexium]

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 Jan 13, 2025
@ti-chi-bot
Copy link

ti-chi-bot bot commented Jan 13, 2025

[LGTM Timeline notifier]

Timeline:

  • 2025-01-08 08:09:53.746994923 +0000 UTC m=+341137.035826626: ☑️ agreed by ekexium.
  • 2025-01-13 07:36:50.10799023 +0000 UTC m=+771153.396821934: ☑️ agreed by MyonKeminta.

@ti-chi-bot ti-chi-bot bot merged commit d66e460 into tikv:tidb-8.5 Jan 13, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved dco-signoff: yes Indicates the PR's author has signed the dco. lgtm size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants