consumer: skip data file by global checkpointTs in storage consumer (#4886) - #5939
consumer: skip data file by global checkpointTs in storage consumer (#4886)#5939ti-chi-bot wants to merge 3 commits into
Conversation
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
|
This cherry pick PR is for a release branch and has not yet been approved by triage owners. To merge this cherry pick:
DetailsInstructions 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-sigs/prow repository. |
|
@wk989898 This PR has conflicts, I have hold it. |
|
@ti-chi-bot: ## If you want to know how to resolve it, please read the guide in TiDB Dev Guide. DetailsInstructions 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. |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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. Comment |
|
Cherry-pick conflicts appear resolved; removing the |
|
@ti-chi-bot: The following test failed, say
Full PR test history. Your PR dashboard. DetailsInstructions 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-sigs/prow repository. I understand the commands that are listed here. |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: wk989898 The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
This is an automated cherry-pick of #4886
Added functionality to retrieve and update global checkpoint timestamp from metadata file.
What problem does this PR solve?
Issue Number: close #4885
What is changed and how it works?
file discovery is now fenced by the storage metadata checkpoint, instead of discovering every visible schema.json and .index file immediately.
and immediately inserted them into the consumer’s in-memory seen state
(tableDMLIdxMap / tableDefMap), then diffDMLMaps() decided what was “new”.
cmd/storage-consumer/consumer.go:596, and advance tableDDLWatermark. If an
older-version DML index was only discovered in the next round, it hit the
unchanged stale-DML branch at cmd/storage-consumer/consumer.go:678 and got
dropped.
TableVersion is ahead of the current global checkpoint are skipped before
they enter the seen maps.
checkpoint later advances, those files are discovered for the first time
and diffDMLMaps() still reports them as genuinely new.
storage-consumer/consumer.go:680 is unchanged. The fix works by preventing
future schema versions from being discovered too early, so the watermark
no longer runs ahead of older-version DML discovery.
Check List
Tests
Questions
Will it cause performance regression or break compatibility?
Do you need to update user documentation, design documentation or monitoring documentation?
Release note