Skip to content

logpuller: control region scan admission with memory quota - #5669

Open
lidezhu wants to merge 19 commits into
masterfrom
ldz/refactor-puller06
Open

logpuller: control region scan admission with memory quota#5669
lidezhu wants to merge 19 commits into
masterfrom
ldz/refactor-puller06

Conversation

@lidezhu

@lidezhu lidezhu commented Jul 17, 2026

Copy link
Copy Markdown
Collaborator

What problem does this PR solve?

Issue Number: close #5519

What is changed and how it works?

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

Questions

Will it cause performance regression or break compatibility?
Do you need to update user documentation, design documentation or monitoring documentation?

Release note

Please refer to [Release Notes Language Style Guide](https://pingcap.github.io/tidb-dev-guide/contribute-to-tidb/release-notes-style-guide.html) to write a quality release note.

If you don't think this PR needs a release note then fill it with `None`.

@ti-chi-bot

ti-chi-bot Bot commented Jul 17, 2026

Copy link
Copy Markdown

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@ti-chi-bot ti-chi-bot Bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Jul 17, 2026
@coderabbitai

coderabbitai Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@lidezhu, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 43 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: ca4f9ce0-be14-446c-89b9-8da95dae6162

📥 Commits

Reviewing files that changed from the base of the PR and between 825a0b3 and 4a8d179.

📒 Files selected for processing (21)
  • logservice/logpuller/memory_quota.go
  • logservice/logpuller/memory_quota_test.go
  • logservice/logpuller/region_admission_controller.go
  • logservice/logpuller/region_admission_controller_test.go
  • logservice/logpuller/region_event_handler.go
  • logservice/logpuller/region_event_handler_test.go
  • logservice/logpuller/region_event_sink.go
  • logservice/logpuller/region_event_sink_test.go
  • logservice/logpuller/region_request_scheduler.go
  • logservice/logpuller/region_request_scheduler_test.go
  • logservice/logpuller/region_request_store.go
  • logservice/logpuller/region_request_store_test.go
  • logservice/logpuller/region_request_worker.go
  • logservice/logpuller/region_request_worker_test.go
  • logservice/logpuller/subscription_client.go
  • logservice/logpuller/subscription_client_test.go
  • metrics/grafana/ticdc_new_arch.json
  • metrics/nextgengrafana/ticdc_new_arch_next_gen.json
  • pkg/config/debug.go
  • pkg/config/debug_test.go
  • pkg/metrics/log_puller.go
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ldz/refactor-puller06

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@lidezhu
lidezhu force-pushed the ldz/refactor-puller05 branch 3 times, most recently from 33e46fc to 7e3df1d Compare August 4, 2026 08:00
@lidezhu
lidezhu force-pushed the ldz/refactor-puller06 branch from 781a526 to dfe8bfa Compare August 4, 2026 09:43
@lidezhu
lidezhu force-pushed the ldz/refactor-puller05 branch from 7e3df1d to d16779c Compare August 10, 2026 09:11
Base automatically changed from ldz/refactor-puller05 to master August 12, 2026 07:28
@lidezhu
lidezhu force-pushed the ldz/refactor-puller06 branch from 17631b1 to 9291268 Compare August 12, 2026 11:23
@ti-chi-bot

ti-chi-bot Bot commented Aug 12, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign nongfushanquan for approval. For more information see the Code Review Process.
Please ensure that each of them provides their approval before proceeding.

The full list of commands accepted by this bot can be found 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

@lidezhu
lidezhu marked this pull request as ready for review August 12, 2026 11:51
@ti-chi-bot ti-chi-bot Bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Aug 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-note Denotes a PR that will be considered when it comes time to generate release notes. 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.

logpuller: improve memory quota mechanism

1 participant