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

reset internal state of feedStateManager when shouldBeRunning is false #9893

Merged
merged 7 commits into from
Oct 16, 2023

Conversation

CharlesCheung96
Copy link
Contributor

@CharlesCheung96 CharlesCheung96 commented Oct 16, 2023

What problem does this PR solve?

Issue Number: close #9892 #9650

What is changed and how it works?

  1. reset internal state of feedStateManager when shouldBeRunning is false.
  2. reset isRetrying to false when resuming changefeed.

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

`Fix a bug that changefeed fails directly when a warning is encountered after resume`.

@ti-chi-bot ti-chi-bot bot added needs-cherry-pick-release-6.5 Should cherry pick this PR to release-6.5 branch. needs-cherry-pick-release-7.1 Should cherry pick this PR to release-7.1 branch. 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. labels Oct 16, 2023
@ti-chi-bot ti-chi-bot bot removed the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Oct 16, 2023
@CharlesCheung96
Copy link
Contributor Author

/test all

@ti-chi-bot ti-chi-bot bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Oct 16, 2023
@asddongmen
Copy link
Contributor

Could you please add a unit test case to cover it?

@@ -416,12 +428,14 @@ func (m *feedStateManager) patchState(feedState model.FeedState) {
})
}

func (m *feedStateManager) cleanUpTaskPositions() {
Copy link
Contributor

Choose a reason for hiding this comment

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

how it works?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Cleanup checkpointTs and resolvedTs before stopping, and it will be initialized when changefeed resumes.

@ti-chi-bot ti-chi-bot bot added needs-1-more-lgtm Indicates a PR needs 1 more LGTM. approved labels Oct 16, 2023
@ti-chi-bot ti-chi-bot bot added the lgtm label Oct 16, 2023
@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Oct 16, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: asddongmen, nongfushanquan

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 removed the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Oct 16, 2023
@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Oct 16, 2023

[LGTM Timeline notifier]

Timeline:

  • 2023-10-16 07:48:24.762490422 +0000 UTC m=+1643302.349600567: ☑️ agreed by asddongmen.
  • 2023-10-16 08:00:21.646376949 +0000 UTC m=+1644019.233487095: ☑️ agreed by nongfushanquan.

@nongfushanquan
Copy link
Contributor

/retest

3 similar comments
@CharlesCheung96
Copy link
Contributor Author

/retest

@CharlesCheung96
Copy link
Contributor Author

/retest

@CharlesCheung96
Copy link
Contributor Author

/retest

@ti-chi-bot ti-chi-bot bot merged commit 432828b into pingcap:master Oct 16, 2023
3 checks passed
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-6.5: #9904.

ti-chi-bot pushed a commit to ti-chi-bot/tiflow that referenced this pull request Oct 16, 2023
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-7.1: #9905.

ti-chi-bot pushed a commit to ti-chi-bot/tiflow that referenced this pull request Oct 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm needs-cherry-pick-release-6.5 Should cherry pick this PR to release-6.5 branch. needs-cherry-pick-release-7.1 Should cherry pick this PR to release-7.1 branch. release-note Denotes a PR that will be considered when it comes time to generate release notes. 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.

changefeed fails directly when a warning is encountered after resume
4 participants