Skip to content

Conversation

@drmingdrmer
Copy link
Member

@drmingdrmer drmingdrmer commented Jan 5, 2026

I hereby agree to the terms of the CLA available at: https://docs.databend.com/dev/policies/cla/

Summary

refactor(meta): upgrade openraft to v0.10.0-alpha.13

Upgrade openraft dependency and adapt to API changes in the new version.
The main changes include a new streaming apply API and updated watch
receiver trait methods.

Changes:

  • Upgrade openraft from v0.10.0-alpha.11 to v0.10.0-alpha.13
  • Update TypeConfig to use new Responder<T> and ErrorSource types
  • Add type aliases: WatchReceiver<T>, Unreachable, EntryResponder
  • Change SMV003::apply_entries() to accept stream instead of iterator
  • Replace .borrow() with .borrow_watched() for watch receivers
  • Add From<SnapshotStoreError> for io::Error implementation
  • Update tests to use stream-based apply API

Tests

  • Unit Test
  • Logic Test
  • Benchmark Test
  • No Test - Explain why

Type of change

  • Other

Related Issues


This change is Reviewable

@github-actions github-actions bot added the pr-refactor this PR changes the code base without new features or bugfix label Jan 5, 2026
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5954c64f79

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@drmingdrmer drmingdrmer force-pushed the 338-xx branch 3 times, most recently from 3372b48 to 086bd0d Compare January 5, 2026 13:23
Copy link

@xp-trumpet xp-trumpet left a comment

Choose a reason for hiding this comment

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

@xp-trumpet reviewed 18 files and all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @drmingdrmer).

Copy link
Member Author

@drmingdrmer drmingdrmer left a comment

Choose a reason for hiding this comment

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

@drmingdrmer resolved 1 discussion.
Reviewable status: 6 of 18 files reviewed, all discussions resolved (waiting on @xp-trumpet).

@drmingdrmer drmingdrmer force-pushed the 338-xx branch 2 times, most recently from 76e12cc to 5ec5af0 Compare January 5, 2026 15:03
…ized payloads

Upgrade openraft dependency and adapt to API changes in the new version.
The main changes include a new streaming apply API, updated watch receiver
trait methods, and automatic payload size management for AppendEntries.

In openraft 0.10.0, `PayloadTooLarge` error was removed. This change
implements automatic payload size management in `append_entries()` by
reducing entry count and retrying when payloads exceed gRPC limits.

Changes:
- Upgrade openraft from `v0.10.0-alpha.11` to `v0.10.0-alpha.13`
- Update `TypeConfig` to use new `Responder<T>` and `ErrorSource` types
- Add type aliases: `WatchReceiver<T>`, `Unreachable`, `EntryResponder`
- Change `SMV003::apply_entries()` to accept stream instead of iterator
- Replace `.borrow()` with `.borrow_watched()` for watch receivers
- Add `From<SnapshotStoreError> for io::Error` implementation
- Update tests to use stream-based apply API
- Add retry loop in `append_entries()` to handle oversized payloads
- Add `build_partial_append_request()` helper for creating partial requests
- Check payload size before sending against `advisory_encoding_size()`
- Handle `tonic::Code::ResourceExhausted` by reducing entries and retrying
- Return `Unreachable` error when single entry exceeds size limit
- Remove obsolete `new_append_entries_raft_req()` function
@drmingdrmer drmingdrmer merged commit 7e32113 into databendlabs:main Jan 6, 2026
168 of 171 checks passed
@drmingdrmer drmingdrmer deleted the 338-xx branch January 6, 2026 03:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-refactor this PR changes the code base without new features or bugfix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants