Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

syncer: use task runner to sync region #9159

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

okJiang
Copy link
Member

@okJiang okJiang commented Mar 19, 2025

What problem does this PR solve?

This PR only fixes the bug; there will still be some delay between the follower and leader regions. In the future, we will increase the concurrency of consumers to alleviate the delay between the follower and leader under these conditions.

Issue Number: Close #9154

What is changed and how does it work?

Check List

Tests

  • Unit test
  • Integration test

Release note

Fix a bug that the region of follower synced from leader may miss during large of region heartbeat.

@ti-chi-bot ti-chi-bot bot added do-not-merge/needs-triage-completed release-note Denotes a PR that will be considered when it comes time to generate release notes. dco-signoff: yes Indicates the PR's author has signed the dco. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed do-not-merge/needs-triage-completed labels Mar 19, 2025
Signed-off-by: okJiang <[email protected]>
@okJiang
Copy link
Member Author

okJiang commented Mar 20, 2025

/retest

Copy link

codecov bot commented Mar 20, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 76.36%. Comparing base (e8050f7) to head (fdf1bcb).
Report is 4 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #9159      +/-   ##
==========================================
- Coverage   76.37%   76.36%   -0.02%     
==========================================
  Files         474      474              
  Lines       72400    72437      +37     
==========================================
+ Hits        55297    55315      +18     
- Misses      13644    13657      +13     
- Partials     3459     3465       +6     
Flag Coverage Δ
unittests 76.36% <100.00%> (∅)

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@okJiang
Copy link
Member Author

okJiang commented Mar 21, 2025

/hold

I will try to test in a real cluster.

@ti-chi-bot ti-chi-bot bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 21, 2025
ctx.SyncRegionRunner.RunTask(
regionID,
ratelimit.SyncRegionToFollower,
func(context.Context) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need to add a unit test for it?

Copy link
Contributor

@lhy1024 lhy1024 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

ti-chi-bot bot commented Mar 24, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: lhy1024

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

The pull request process is described here

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 the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Mar 24, 2025
Copy link
Contributor

ti-chi-bot bot commented Mar 24, 2025

[LGTM Timeline notifier]

Timeline:

  • 2025-03-24 07:33:26.100812639 +0000 UTC m=+859299.785048733: ☑️ agreed by lhy1024.

@ti-chi-bot ti-chi-bot bot added the approved label Mar 24, 2025
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. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. needs-1-more-lgtm Indicates a PR needs 1 more LGTM. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Region will not be synced if the channel buffer is full
2 participants