Skip to content

Conversation

@Leavrth
Copy link

@Leavrth Leavrth commented Feb 3, 2026

What problem does this PR solve?

Issue Number: close #xxx

What is changed and how it works?

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

Please refer to [Release Notes Language Style Guide](https://pingcap.github.io/tidb-dev-guide/contribute-to-tidb/release-notes-style-guide.html) to write a quality release note.

If you don't think this PR needs a release note then fill it with `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 Denotes a PR that will be considered when it comes time to generate release notes. labels Feb 3, 2026
@ti-chi-bot
Copy link

ti-chi-bot bot commented Feb 3, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign flowbehappy for approval. For more information see the Code Review Process.
Please ensure that each of them provides their approval before proceeding.

The full list of commands accepted by this bot can be found 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

@coderabbitai
Copy link

coderabbitai bot commented Feb 3, 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.

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

  • 🔍 Trigger a full review
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

@pingcap-cla-assistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@ti-chi-bot ti-chi-bot bot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Feb 3, 2026
@gemini-code-assist
Copy link

Summary of Changes

Hello @Leavrth, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request undertakes a significant dependency upgrade and refactoring effort, primarily focusing on migrating the project's external object storage interactions to the updated tidb/pkg/objstore/storeapi. This ensures alignment with the latest TiDB ecosystem standards. Beyond this core migration, the PR also updates a wide array of Go module dependencies, enhances the gRPC buffer pooling strategy, and refines the S3 retryer logic, collectively improving the project's stability, performance, and maintainability by incorporating newer library versions and best practices.

Highlights

  • Object Storage API Migration: The project has been updated to use the new github.com/pingcap/tidb/pkg/objstore/storeapi for external object storage interactions, replacing the older github.com/pingcap/tidb/br/pkg/storage package. This change affects various components including cloud storage sinks, redo logs, and claim check functionalities, ensuring compatibility with the latest TiDB storage interfaces.
  • Dependency Upgrades: Numerous Go module dependencies have been updated to their latest versions. This includes upgrading the Go language version from 1.25.5 to 1.25.6, and updating critical libraries such as tidb, kvproto, tikv/client-go, prometheus/client_golang, and various golang.org/x packages. This ensures the project benefits from the latest features, bug fixes, and security patches.
  • gRPC Buffer Pool Configuration Update: The gRPC connection handling has been refined by switching the buffer pool configuration from experimental.WithRecvBufferPool(grpc.NewSharedBufferPool()) to experimental.WithBufferPool(mem.DefaultBufferPool()). This change likely optimizes memory usage and performance for gRPC communications.
  • S3 Retryer Logic Enhancement: The S3 retryer implementation has been refactored to leverage aws-sdk-go-v2/aws/retry.Standard, providing a more robust and configurable mechanism for handling transient failures during S3 operations. This includes improved control over retry delays and throttling.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • cmd/storage-consumer/consumer.go
    • Updated external storage type from storage.ExternalStorage to storeapi.Storage.
    • Updated storage.WalkOption to storeapi.WalkOption.
  • downstreamadapter/sink/cloudstorage/dml_writers.go
    • Updated external storage type from storage.ExternalStorage to storeapi.Storage.
  • downstreamadapter/sink/cloudstorage/sink.go
    • Updated external storage type from storage.ExternalStorage to storeapi.Storage.
  • downstreamadapter/sink/cloudstorage/writer.go
    • Updated external storage type from storage.ExternalStorage to storeapi.Storage.
    • Updated storage.WriterOption to storeapi.WriterOption.
  • downstreamadapter/sink/redo/meta.go
    • Updated external storage type from storage.ExternalStorage to storeapi.Storage.
    • Changed storage.ParseRawURL to objstore.ParseRawURL.
    • Added import for github.com/pingcap/tidb/pkg/objstore.
  • go.mod
    • Upgraded Go version from 1.25.5 to 1.25.6.
    • Updated github.com/BurntSushi/toml from v1.5.0 to v1.6.0.
    • Updated github.com/aws/aws-sdk-go from v1.55.5 to v1.55.7.
    • Updated github.com/go-mysql-org/go-mysql from v1.12.0 to v1.13.0.
    • Updated github.com/google/uuid from v1.6.0 to v1.6.1-0.20241114170450-2d3c2a9cc518.
    • Updated github.com/pingcap/kvproto to v0.0.0-20260120063856-d09230288811.
    • Updated github.com/pingcap/tidb to v1.1.0-beta.0.20260202071506-bbeaafdd7b9e.
    • Updated github.com/prometheus/client_golang from v1.22.0 to v1.23.0.
    • Updated github.com/tikv/client-go/v2 to v2.0.8-0.20260128013340-9610073f20ae.
    • Updated github.com/tikv/pd/client to v0.0.0-20260119083144-b273ae0421dd.
    • Updated various golang.org/x packages (e.g., net, oauth2, sync, sys, term, text, time).
    • Updated google.golang.org/grpc from v1.67.1 to v1.73.0.
    • Updated google.golang.org/protobuf from v1.36.6 to v1.36.10.
    • Removed outdated replace directives for cloud.google.com/go and google.golang.org/grpc.
    • Added go.opentelemetry.io/auto/sdk and golang.org/x/telemetry indirect dependencies.
  • logservice/logpuller/grpc_conn.go
    • Imported google.golang.org/grpc/mem.
    • Changed gRPC buffer pool configuration to experimental.WithBufferPool(mem.DefaultBufferPool()).
  • pkg/common/event/chunk.go
    • Modified DecodeToChunk function call to include an additional 0 argument.
  • pkg/config/consistent.go
    • Updated storage.ParseRawURL to objstore.ParseRawURL.
    • Added import for github.com/pingcap/tidb/pkg/objstore.
  • pkg/redo/config.go
    • Updated external storage type from storage.ExternalStorage to storeapi.Storage.
  • pkg/redo/config_test.go
    • Updated storage.ParseRawURL to objstore.ParseRawURL.
    • Added import for github.com/pingcap/tidb/pkg/objstore.
  • pkg/redo/reader/file.go
    • Updated external storage type from storage.ExternalStorage to storeapi.Storage.
    • Updated storage.WalkOption to storeapi.WalkOption.
  • pkg/redo/writer/factory/factory.go
    • Updated storage.ParseRawURL to objstore.ParseRawURL.
    • Added import for github.com/pingcap/tidb/pkg/objstore.
  • pkg/redo/writer/file/file.go
    • Updated external storage type from storage.ExternalStorage to storeapi.Storage.
  • pkg/redo/writer/file/file_test.go
    • Updated external storage creation to use objstore.New and storeapi.Options.
    • Updated mock storage type from mockstorage.NewMockExternalStorage to mockstorage.NewMockStorage.
    • Added imports for github.com/pingcap/tidb/pkg/objstore and github.com/pingcap/tidb/pkg/objstore/storeapi.
  • pkg/redo/writer/memory/file_worker.go
    • Updated external storage type from storage.ExternalStorage to storeapi.Storage.
    • Updated storage.WriterOption to storeapi.WriterOption.
  • pkg/sink/cloudstorage/path.go
    • Updated external storage type from storage.ExternalStorage to storeapi.Storage.
    • Updated storage.WalkOption to storeapi.WalkOption.
  • pkg/sink/codec/canal/canal_json_decoder.go
    • Updated external storage type from storage.ExternalStorage to storeapi.Storage.
    • Added import for github.com/pingcap/tidb/pkg/objstore/storeapi.
  • pkg/sink/codec/common/ddl_test.go
    • Updated import path for handle from github.com/pingcap/tidb/pkg/disttask/framework/handle to github.com/pingcap/tidb/pkg/dxf/framework/handle.
  • pkg/sink/codec/open/decoder.go
    • Updated external storage type from storage.ExternalStorage to storeapi.Storage.
    • Added import for github.com/pingcap/tidb/pkg/objstore/storeapi.
  • pkg/sink/codec/simple/decoder.go
    • Updated external storage type from storage.ExternalStorage to storeapi.Storage.
    • Added import for github.com/pingcap/tidb/pkg/objstore/storeapi.
  • pkg/sink/codec/simple/encoder_test.go
    • Updated import path for handle from github.com/pingcap/tidb/pkg/disttask/framework/handle to github.com/pingcap/tidb/pkg/dxf/framework/handle.
  • pkg/sink/kafka/claimcheck/claim_check.go
    • Updated external storage type from storage.ExternalStorage to storeapi.Storage.
    • Added import for github.com/pingcap/tidb/pkg/objstore/storeapi.
  • pkg/sink/mysql/mysql_writer_test.go
    • Updated import path for handle from github.com/pingcap/tidb/pkg/disttask/framework/handle to github.com/pingcap/tidb/pkg/dxf/framework/handle.
  • pkg/util/external_storage.go
    • Updated external storage types from storage.ExternalStorage to storeapi.Storage.
    • Updated storage.BackendOptions to objstore.BackendOptions.
    • Updated storage.ExternalFileReader to objectio.Reader and storage.ExternalFileWriter to objectio.Writer.
    • Refactored S3 retryer logic to use aws-sdk-go-v2/aws/retry.Standard instead of client.DefaultRetryer.
    • Added imports for github.com/aws/aws-sdk-go-v2/aws, github.com/aws/aws-sdk-go-v2/aws/ratelimit, github.com/aws/aws-sdk-go-v2/aws/retry, github.com/pingcap/tidb/pkg/objstore, github.com/pingcap/tidb/pkg/objstore/objectio, and github.com/pingcap/tidb/pkg/objstore/storeapi.
  • pkg/util/external_storage_test.go
    • Updated external storage types in tests to reflect the new objstore/storeapi and objectio interfaces.
Activity
  • The pull request was created by Leavrth with a title indicating a general upgrade of tidb.
  • The description mentions Issue Number: close #xxx, suggesting it's linked to an internal issue, though the specific number is a placeholder.
  • No further human activity (comments, reviews) is evident from the provided context.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@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 upgrades TiDB and several other dependencies. The changes are mostly mechanical, adapting the codebase to new APIs from the upgraded libraries, particularly for the storage layer. The changes appear correct and consistent with the dependency upgrade. I have one minor suggestion to remove a stale comment in go.mod to improve maintainability.

Comment on lines 99 to 100
// Following modules are replaced to use grpc v1.65.0
// We can remove these replacements after upgrading grpc to > 1.65

Choose a reason for hiding this comment

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

medium

This comment is outdated. The grpc dependency has been upgraded to v1.73.0 and the replace directives for grpc and related libraries have been removed. Please remove this stale comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

first-time-contributor Indicates that the PR was contributed by an external member and is a first-time contributor. release-note Denotes a PR that will be considered when it comes time to generate release notes. 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.

1 participant