Skip to content

chore: upgrade tonic and prost to 0.14#552

Open
mingley wants to merge 3 commits into
tikv:masterfrom
mingley:mingley/tonic-0-14
Open

chore: upgrade tonic and prost to 0.14#552
mingley wants to merge 3 commits into
tikv:masterfrom
mingley:mingley/tonic-0-14

Conversation

@mingley

@mingley mingley commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Upgrade tonic to 0.14 and prost to 0.14.
  • Adopt the tonic-prost runtime/codegen split and select the ring TLS backend.
  • Regenerate protobuf clients and remove clones made redundant by prost 0.14 generated Copy types.

This advances the dependency alignment described in roadmap issue #506.

Testing Done

  • Local code review completed
  • make check
  • cargo test --workspace — 116 passed, 0 failed
  • cargo test --workspace --no-default-features — 116 passed, 0 failed
  • make doc — passed
  • PD_ADDRS=127.0.0.1:2379 MULTI_REGION=1 RUST_LOG=info NEXTEST_PROFILE=ci cargo nextest run --config-file config/nextest.toml --all --features integration-tests --test-threads 1 — 128 passed, 0 failed
  • PD_ADDRS=127.0.0.1:2379 MULTI_REGION=1 RUST_LOG=info NEXTEST_PROFILE=ci cargo nextest run --config-file config/nextest.toml --test failpoint_tests --features 'integration-tests fail/failpoints' --test-threads 1 — 6 passed, 0 failed

Summary by CodeRabbit

  • Improvements
    • Updated communication and protocol components for improved compatibility and maintainability.
    • Reduced unnecessary timestamp copying during transaction, lock-resolution, commit, rollback, and heartbeat operations.
    • Preserved existing transaction behavior and public APIs.

Signed-off-by: Michael Ingley <michael.ingley@gmail.com>
@ti-chi-bot ti-chi-bot Bot added the dco-signoff: yes Indicates the PR's author has signed the dco. label Jul 21, 2026
@ti-chi-bot

ti-chi-bot Bot commented Jul 21, 2026

Copy link
Copy Markdown

[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 innerr 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

@ti-chi-bot ti-chi-bot Bot added contribution This PR is from a community contributor. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Jul 21, 2026
@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

This PR upgrades the tonic/prost toolchain and protobuf generation, then removes unnecessary Timestamp and region-epoch cloning across lock resolution, transaction operations, heartbeats, two-phase commit, and rollback paths.

Changes

gRPC build migration and timestamp ownership

Layer / File(s) Summary
Protobuf dependency and generation migration
Cargo.toml, proto-build/Cargo.toml, proto-build/src/main.rs
The tonic/prost dependencies and TLS features are upgraded, and protobuf generation switches to tonic-prost-build with PathBuf include paths.
Lock resolution timestamp passing
src/request/plan.rs, src/transaction/client.rs
Lock resolution and region-epoch handling pass stored values directly instead of cloning them.
Transaction operation timestamp passing
src/transaction/transaction.rs
Read, lifecycle, heartbeat, scan, and pessimistic-lock paths remove unnecessary timestamp clones.
Committer request timestamp passing
src/transaction/transaction.rs
Commit, prewrite, secondary commit, and rollback request construction passes timestamp values directly.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

Suggested labels: lgtm, approved, size/XL

Suggested reviewers: eduralph, pingyu, iosmanthus

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: upgrading prost and tonic to 0.14.
✨ 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.

mingley added 2 commits July 21, 2026 19:18
Signed-off-by: Michael Ingley <michael.ingley@gmail.com>
Signed-off-by: Michael Ingley <michael.ingley@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contribution This PR is from a community contributor. dco-signoff: yes Indicates the PR's author has signed the dco. 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