Skip to content

cdc: filter events with the observed range before load old values#17656

Merged
ti-chi-bot[bot] merged 6 commits intotikv:release-7.5from
hicqu:7.5-cdc-scan-range
Oct 30, 2024
Merged

cdc: filter events with the observed range before load old values#17656
ti-chi-bot[bot] merged 6 commits intotikv:release-7.5from
hicqu:7.5-cdc-scan-range

Conversation

@hicqu
Copy link
Contributor

@hicqu hicqu commented Oct 15, 2024

What is changed and how it works?

Issue Number: Close #16601
Issue Number: Close #17620

What's Changed:

Filter CDC events with the observed range before load old values. This can reduce CPU usage, especially for the situation with lots of continuous RocksDB Tombstones, which are generated from drop/truncate table/partition DDLs.

cdc: filter events with the observed range before load old values

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

hicqu added 3 commits October 12, 2024 15:33
Signed-off-by: qupeng <qupeng@pingcap.com>
Signed-off-by: qupeng <qupeng@pingcap.com>
@ti-chi-bot ti-chi-bot bot added do-not-merge/cherry-pick-not-approved 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 Oct 15, 2024
hicqu added 3 commits October 21, 2024 14:38
Signed-off-by: qupeng <qupeng@pingcap.com>
Signed-off-by: qupeng <qupeng@pingcap.com>
@ti-chi-bot ti-chi-bot bot added cherry-pick-approved Cherry pick PR approved by release team. and removed do-not-merge/cherry-pick-not-approved labels Oct 28, 2024
@hicqu hicqu requested a review from overvenus October 28, 2024 05:14
let resolver = resolver.as_mut();
let entries = self.scan_batch(&mut scanner, cursors, resolver).await?;
let entries = self
.scan_batch(&mut scanner, cursors, resolver, &mut stats)
Copy link
Member

Choose a reason for hiding this comment

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

How about add start and end boundaries to the scanner?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

#17274 does such thing. But it's a huge refactor, we can't apply it to old versions. So here we just avoid unnecessary old-value loadings.

@ti-chi-bot ti-chi-bot bot added the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Oct 28, 2024
@ti-chi-bot ti-chi-bot bot added the lgtm label Oct 29, 2024
@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Oct 29, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: 3AceShowHand, overvenus

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

ti-chi-bot bot commented Oct 29, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-10-28 06:47:07.245768027 +0000 UTC m=+245940.084923568: ☑️ agreed by 3AceShowHand.
  • 2024-10-29 04:26:00.758128287 +0000 UTC m=+323873.597283832: ☑️ agreed by overvenus.

@hicqu
Copy link
Contributor Author

hicqu commented Oct 29, 2024

/test

@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Oct 29, 2024

@hicqu: The /test command needs one or more targets.
The following commands are available to trigger required jobs:

  • /test pull-unit-test

The following commands are available to trigger optional jobs:

  • /debug pull-integration-test

Use /test all to run the following jobs that were automatically triggered:

  • tikv/tikv/release-7.5/pull_unit_test
Details

In response to this:

/test

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 kubernetes/test-infra repository.

@hicqu
Copy link
Contributor Author

hicqu commented Oct 29, 2024

/test pull-unit-test

1 similar comment
@hicqu
Copy link
Contributor Author

hicqu commented Oct 29, 2024

/test pull-unit-test

@hicqu
Copy link
Contributor Author

hicqu commented Oct 30, 2024

/retest

1 similar comment
@hicqu
Copy link
Contributor Author

hicqu commented Oct 30, 2024

/retest

@ti-chi-bot ti-chi-bot bot merged commit e36cdcf into tikv:release-7.5 Oct 30, 2024
@hicqu hicqu deleted the 7.5-cdc-scan-range branch October 30, 2024 11:41
@hicqu
Copy link
Contributor Author

hicqu commented Nov 4, 2024

/cherry-pick release-7.1

ti-chi-bot pushed a commit to ti-chi-bot/tikv that referenced this pull request Nov 4, 2024
close tikv#16601, close tikv#17620

Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
@ti-chi-bot
Copy link
Member

@hicqu: new pull request created to branch release-7.1: #17764.

Details

In response to this:

/cherry-pick release-7.1

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 bot pushed a commit that referenced this pull request Nov 4, 2024
…7656) (#17764)

close #16601, close #17620

cdc: filter events with the observed range before load old values

Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
Signed-off-by: qupeng <qupeng@pingcap.com>

Co-authored-by: qupeng <qupeng@pingcap.com>
ti-chi-bot bot added a commit that referenced this pull request Jan 23, 2025
close #18142

cdc: fix the panic introduced by #17656

Signed-off-by: qupeng <qupeng@pingcap.com>

Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
ti-chi-bot bot pushed a commit that referenced this pull request Jan 23, 2025
close #18142

cdc: fix the panic introduced by #17656

Signed-off-by: qupeng <qupeng@pingcap.com>

Co-authored-by: qupeng <qupeng@pingcap.com>
hicqu added a commit to hicqu/tikv that referenced this pull request Jan 24, 2025
close tikv#18142

cdc: fix the panic introduced by tikv#17656

Signed-off-by: qupeng <qupeng@pingcap.com>

Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
hicqu added a commit to hicqu/tikv that referenced this pull request Jan 24, 2025
close tikv#18142

cdc: fix the panic introduced by tikv#17656

Signed-off-by: qupeng <qupeng@pingcap.com>

Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
hicqu added a commit that referenced this pull request Jan 24, 2025
cdc: fix the panic introduced by #17656

Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
hicqu added a commit to hicqu/tikv that referenced this pull request Jan 24, 2025
close tikv#18142

cdc: fix the panic introduced by tikv#17656

Signed-off-by: qupeng <qupeng@pingcap.com>

Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
hicqu added a commit that referenced this pull request Jan 24, 2025
cdc: fix the panic introduced by #17656

Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
@3AceShowHand
Copy link
Contributor

/cherry-pick release-8.1

@ti-chi-bot
Copy link
Member

@3AceShowHand: new pull request created to branch release-8.1: #19050.
But this PR has conflicts, please resolve them!

Details

In response to this:

/cherry-pick release-8.1

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 pushed a commit to ti-chi-bot/tikv that referenced this pull request Oct 13, 2025
close tikv#16601, close tikv#17620

Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved cherry-pick-approved Cherry pick PR approved by release team. 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.

4 participants