Skip to content

concurrency_manager: double check via PD TSO before reporting error of invalid max-ts update#18057

Merged
ti-chi-bot[bot] merged 2 commits intotikv:masterfrom
ekexium:fix-max-ts-checker-double-check
Dec 27, 2024
Merged

concurrency_manager: double check via PD TSO before reporting error of invalid max-ts update#18057
ti-chi-bot[bot] merged 2 commits intotikv:masterfrom
ekexium:fix-max-ts-checker-double-check

Conversation

@ekexium
Copy link
Contributor

@ekexium ekexium commented Dec 25, 2024

What is changed and how it works?

Issue Number: Close #18055

What's Changed:

concurrency_manager: double check via PD TSO before reporting error of invalid max-ts update

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 bot added do-not-merge/needs-triage-completed dco-signoff: yes Indicates the PR's author has signed the dco. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed do-not-merge/needs-triage-completed labels Dec 25, 2024
…update

Signed-off-by: ekexium <eke@fastmail.com>
@ekexium ekexium force-pushed the fix-max-ts-checker-double-check branch from f3b6fc5 to de87862 Compare December 25, 2024 12:00
@ekexium ekexium requested review from MyonKeminta and you06 December 25, 2024 12:00
@ti-chi-bot ti-chi-bot bot added release-note-none Denotes a PR that doesn't merit a release note. and removed do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Dec 25, 2024
@ekexium
Copy link
Contributor Author

ekexium commented Dec 26, 2024

/retest

Copy link
Contributor

@you06 you06 left a comment

Choose a reason for hiding this comment

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

rest LGTM

Signed-off-by: ekexium <eke@fastmail.com>
@ti-chi-bot ti-chi-bot bot added needs-1-more-lgtm Indicates a PR needs 1 more LGTM. approved labels Dec 27, 2024
Copy link
Collaborator

@cfzjywxk cfzjywxk left a comment

Choose a reason for hiding this comment

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

LGTM

@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Dec 27, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cfzjywxk, you06

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

ti-chi-bot bot commented Dec 27, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-12-27 08:33:09.008921457 +0000 UTC m=+80124.364925996: ☑️ agreed by you06.
  • 2024-12-27 08:33:48.763261857 +0000 UTC m=+80164.119266396: ☑️ agreed by cfzjywxk.

@ti-chi-bot ti-chi-bot bot merged commit 83feb16 into tikv:master Dec 27, 2024
@ti-chi-bot ti-chi-bot bot added this to the Pool milestone Dec 27, 2024
ekexium added a commit to ti-chi-bot/tikv that referenced this pull request Jan 6, 2025
…f invalid max-ts update (tikv#18057)

close tikv#18055

concurrency_manager: double check via PD TSO before reporting error of invalid max-ts update

Signed-off-by: ekexium <eke@fastmail.com>
ekexium added a commit to ti-chi-bot/tikv that referenced this pull request Jan 7, 2025
…f invalid max-ts update (tikv#18057)

close tikv#18055

concurrency_manager: double check via PD TSO before reporting error of invalid max-ts update

Signed-off-by: ekexium <eke@fastmail.com>
ekexium added a commit to ti-chi-bot/tikv that referenced this pull request Jan 7, 2025
…f invalid max-ts update (tikv#18057)

close tikv#18055

concurrency_manager: double check via PD TSO before reporting error of invalid max-ts update

Signed-off-by: ekexium <eke@fastmail.com>
ekexium added a commit to ti-chi-bot/tikv that referenced this pull request Jan 7, 2025
…f invalid max-ts update (tikv#18057)

close tikv#18055

concurrency_manager: double check via PD TSO before reporting error of invalid max-ts update

Signed-off-by: ekexium <eke@fastmail.com>
ekexium added a commit to ti-chi-bot/tikv that referenced this pull request Jan 7, 2025
…f invalid max-ts update (tikv#18057)

close tikv#18055

concurrency_manager: double check via PD TSO before reporting error of invalid max-ts update

Signed-off-by: ekexium <eke@fastmail.com>
bufferflies pushed a commit to bufferflies/tikv that referenced this pull request Sep 19, 2025
* concurrency_manager: check update_max_ts against a limit (tikv#17917)

close tikv#17916

concurrency_manager: add safety boundary for max_ts updates

Add `max_ts_limit` to prevent unreasonable timestamp updates. The limit is
synchronized with PD timestamp periodically. Configure via max_ts_allowance_secs
 and max_ts_sync_interval_secs.

Updates from PD bypass this limit.

Signed-off-by: ekexium <eke@fastmail.com>

Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
Signed-off-by: ekexium <eke@fastmail.com>

* concurrency_manager: double check via PD TSO before reporting error of invalid max-ts update (tikv#18057)

close tikv#18055

concurrency_manager: double check via PD TSO before reporting error of invalid max-ts update

Signed-off-by: ekexium <eke@fastmail.com>

* concurrency_manager: make max-ts checker more robust (tikv#18080)

ref tikv#18055

When validating max-ts updates, do not report error or panic unless confirmed by PD TSO.
This reduces both false positive and false negative cases.

Signed-off-by: ekexium <eke@fastmail.com>

Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
Signed-off-by: ekexium <eke@fastmail.com>

* config: rename config items for max-ts checker (tikv#18118)

ref tikv#17916

config: rename config items for max-ts checker

Signed-off-by: ekexium <eke@fastmail.com>

* concurrency-manager: do not assert in concurrency manager (tikv#18329)

ref tikv#17916

Do not assert in concurrency manager.

Signed-off-by: ekexium <eke@fastmail.com>

* delete unexpected files from cherry-picking

Signed-off-by: ekexium <eke@fastmail.com>

---------

Signed-off-by: ekexium <eke@fastmail.com>
Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
bufferflies pushed a commit to bufferflies/tikv that referenced this pull request Sep 19, 2025
* concurrency_manager: check update_max_ts against a limit (tikv#17917)

close tikv#17916

concurrency_manager: add safety boundary for max_ts updates

Add `max_ts_limit` to prevent unreasonable timestamp updates. The limit is
synchronized with PD timestamp periodically. Configure via max_ts_allowance_secs
 and max_ts_sync_interval_secs.

Updates from PD bypass this limit.

Signed-off-by: ekexium <eke@fastmail.com>

Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
Signed-off-by: ekexium <eke@fastmail.com>

* concurrency_manager: double check via PD TSO before reporting error of invalid max-ts update (tikv#18057)

close tikv#18055

concurrency_manager: double check via PD TSO before reporting error of invalid max-ts update

Signed-off-by: ekexium <eke@fastmail.com>

* concurrency_manager: make max-ts checker more robust (tikv#18080)

ref tikv#18055

When validating max-ts updates, do not report error or panic unless confirmed by PD TSO.
This reduces both false positive and false negative cases.

Signed-off-by: ekexium <eke@fastmail.com>

Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
Signed-off-by: ekexium <eke@fastmail.com>

* config: rename config items for max-ts checker (tikv#18118)

ref tikv#17916

config: rename config items for max-ts checker

Signed-off-by: ekexium <eke@fastmail.com>

* concurrency-manager: do not assert in concurrency manager (tikv#18329)

ref tikv#17916

Do not assert in concurrency manager.

Signed-off-by: ekexium <eke@fastmail.com>

* delete unexpected files from cherry-picking

Signed-off-by: ekexium <eke@fastmail.com>

---------

Signed-off-by: ekexium <eke@fastmail.com>
Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
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 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.

more than one of tikv panic when injection pd leader timeoffset (ahead 5mins)

3 participants