consumer: skip data file by global checkpointTs in storage consumer - #4886
Conversation
Added functionality to retrieve and update global checkpoint timestamp from metadata file.
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 50 minutes and 35 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
There was a problem hiding this comment.
Code Review
This pull request introduces a mechanism to filter DML and schema files based on a global checkpoint timestamp retrieved from a 'metadata' file in external storage. The consumer now tracks a globalCheckpointTs and uses it to skip files with a version higher than the current checkpoint. Review feedback identifies a critical backward compatibility issue: if the metadata file is missing, the checkpoint defaults to 0, causing all files to be skipped. It is recommended to only apply the filtering logic when a non-zero checkpoint has been successfully retrieved.
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
|
/test storage |
1 similar comment
|
/test storage |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: 3AceShowHand, wlwilliamx 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 |
[LGTM Timeline notifier]Timeline:
|
|
@wk989898: 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. |
|
In response to a cherrypick label: new pull request created to branch |
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