Skip to content

checker: get incremental data without list | pd=release-8.5-20260121-v8.5.5 tikv=release-8.5-20260121-v8.5.5 tidb=release-8.5-20260121-v8.5.5#4778

Merged
ti-chi-bot[bot] merged 4 commits intopingcap:release-8.5-20260213-v8.5.5from
Leavrth:get_incremental_data_without_list
Apr 13, 2026
Merged

Conversation

@Leavrth
Copy link
Copy Markdown

@Leavrth Leavrth commented Apr 9, 2026

What problem does this PR solve?

Issue Number: close #4244

What is changed and how it works?

read the file index to get the incremental files and table versions

Check List

Tests

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

Questions

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

Release note

None

Signed-off-by: Jianjun Liao <jianjun.liao@outlook.com>
@ti-chi-bot ti-chi-bot bot added first-time-contributor Indicates that the PR was contributed by an external member and is a first-time contributor. release-note-none Denotes a PR that doesn't merit a release note. labels Apr 9, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 9, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 966499cf-9793-469c-a6df-5f5dccf66e12

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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 and usage tips.

@Leavrth Leavrth changed the title checker: get incremental data without list checker: get incremental data without list | pd=release-8.5-20260121-v8.5.5 tikv=release-8.5-20260121-v8.5.5 tidb=release-8.5-20260121-v8.5.5 Apr 9, 2026
@ti-chi-bot ti-chi-bot bot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Apr 9, 2026
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces an alternative file discovery mechanism for the multi-cluster consistency checker's S3 consumer. The new mechanism, enabled by the EnableListByFileIndex configuration, uses index files to discover schema and data files, which improves reliability by not relying on the eventual consistency of directory listings. The file discovery logic has been refactored into a newFileDiscoverer interface with two implementations: directoryBasedNewFileDiscoverer (the existing approach) and indexBasedNewFileDiscoverer (the new index-based approach). New configuration options and validations have been added to ensure correct usage, such as requiring date-separator=none and disabling enable-table-across-nodes when the index-based discovery is active. The review comments suggest renaming inconsistent parameter names for clarity and fixing a stuttering function name in the new file discoverer factory.

func NewS3Consumer(
s3Storage storage.ExternalStorage,
tables map[string][]string,
enableSchemaIndexByGetObject bool,
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The parameter name enableSchemaIndexByGetObject is inconsistent with the configuration option enable-list-by-file-index and the parameter name used in the NewNewFileDiscoverer factory function. For better code clarity and maintainability, consider renaming it to enableListByFileIndex.

Suggested change
enableSchemaIndexByGetObject bool,
enableListByFileIndex bool,

) (map[cloudstorage.DmlPathKey]fileIndexRange, error)
}

func NewNewFileDiscoverer(c *S3Consumer, enableListByFileIndex bool) newFileDiscoverer {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The function name NewNewFileDiscoverer stutters. To improve readability, consider renaming it to NewFileDiscoverer. This change should be propagated to its call site in consumer.go.

Suggested change
func NewNewFileDiscoverer(c *S3Consumer, enableListByFileIndex bool) newFileDiscoverer {
func NewFileDiscoverer(c *S3Consumer, enableListByFileIndex bool) newFileDiscoverer {

checkpointWatcher Watcher,
s3Storage storage.ExternalStorage,
tables map[string][]string,
enableSchemaIndexByGetObject bool,
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The parameter name enableSchemaIndexByGetObject is inconsistent with the global configuration option enable-list-by-file-index. To improve consistency and readability across the codebase, please consider renaming it to enableListByFileIndex.

Suggested change
enableSchemaIndexByGetObject bool,
enableListByFileIndex bool,

Signed-off-by: Jianjun Liao <jianjun.liao@outlook.com>
@ti-chi-bot ti-chi-bot bot added the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Apr 9, 2026
@ti-chi-bot ti-chi-bot bot added the lgtm label Apr 10, 2026
@ti-chi-bot
Copy link
Copy Markdown

ti-chi-bot bot commented Apr 10, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: flowbehappy, hongyunyan

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

The pull request process is described 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

@ti-chi-bot ti-chi-bot bot added approved and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Apr 10, 2026
@ti-chi-bot
Copy link
Copy Markdown

ti-chi-bot bot commented Apr 10, 2026

[LGTM Timeline notifier]

Timeline:

  • 2026-04-09 14:39:04.207801339 +0000 UTC m=+1053549.413161386: ☑️ agreed by hongyunyan.
  • 2026-04-10 02:18:06.853306065 +0000 UTC m=+1095492.058666122: ☑️ agreed by flowbehappy.

Leavrth added 2 commits April 10, 2026 10:51
Signed-off-by: Jianjun Liao <jianjun.liao@outlook.com>
Signed-off-by: Jianjun Liao <jianjun.liao@outlook.com>
@Leavrth
Copy link
Copy Markdown
Author

Leavrth commented Apr 13, 2026

/retest

@ti-chi-bot ti-chi-bot bot merged commit 2ddebec into pingcap:release-8.5-20260213-v8.5.5 Apr 13, 2026
26 of 27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved first-time-contributor Indicates that the PR was contributed by an external member and is a first-time contributor. lgtm release-note-none Denotes a PR that doesn't merit a release note. 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.

3 participants