Skip to content

Conversation

@aditya-rajpurohit
Copy link
Contributor

@aditya-rajpurohit aditya-rajpurohit commented Jan 8, 2026

Which Issue(s) This PR Fixes(Closes)

Fixes #5548

Brief Description

This PR removes unused and commented-out code from produce_accumulator.rs.

The removed code included:

  • ready_to_send function
  • add_with_callback method
  • batch and split_send_results helpers
  • send and send_with_callback methods

These functions and methods were not used anywhere in the project, and cleaning them up improves code readability and maintainability.

How Did You Test This Change?

  • Verified that the project builds successfully using cargo build
  • Ran unit tests with cargo test to ensure no functionality was affected

Summary by CodeRabbit

  • Refactor
    • Restructured the message producer accumulator, simplifying the message batching and sending workflow to a foundational state pending further development.

✏️ Tip: You can customize this high-level summary in your review settings.

@rocketmq-rust-bot
Copy link
Collaborator

🔊@aditya-rajpurohit 🚀Thanks for your contribution🎉!

💡CodeRabbit(AI) will review your code first🔥!

Note

🚨The code review suggestions from CodeRabbit are to be used as a reference only, and the PR submitter can decide whether to make changes based on their own judgment. Ultimately, the project management personnel will conduct the final code review💥.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 8, 2026

Walkthrough

This pull request removes six unused methods from the MessageAccumulation struct in the produce accumulator module: ready_to_send, add_with_callback, batch, split_send_results, send, and send_with_callback. The remaining add method is replaced with an unimplemented!() stub.

Changes

Cohort / File(s) Summary
Code Cleanup
rocketmq-client/src/producer/produce_accumulator.rs
Removed 6 unused methods (ready_to_send, add_with_callback, batch, split_send_results, send, send_with_callback); replaced add method body with unimplemented!()

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 A cleanup hops through the code,
Six methods bid their last goodbye,
The accumulator sheds its load,
Leaving only stubs to pry.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title clearly identifies the main change: removing unused code from produce_accumulator.rs, matching the file modifications and referenced issue #5548.
Linked Issues check ✅ Passed The PR successfully removes all unused code from produce_accumulator.rs as required by issue #5548, including six methods and function implementations.
Out of Scope Changes check ✅ Passed All changes are scoped to removing unused code from produce_accumulator.rs; no unrelated modifications or new features are introduced.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4b84a79 and 226c457.

📒 Files selected for processing (1)
  • rocketmq-client/src/producer/produce_accumulator.rs
💤 Files with no reviewable changes (1)
  • rocketmq-client/src/producer/produce_accumulator.rs
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
  • GitHub Check: Code Coverage
  • GitHub Check: Build & Test (windows-latest)
  • GitHub Check: Build & Test (ubuntu-latest)
  • GitHub Check: Build & Test (macos-latest)
  • GitHub Check: auto-approve

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.

@codecov
Copy link

codecov bot commented Jan 8, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 38.53%. Comparing base (ac81e6c) to head (226c457).
⚠️ Report is 6 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5561      +/-   ##
==========================================
+ Coverage   38.51%   38.53%   +0.02%     
==========================================
  Files         815      816       +1     
  Lines      110613   110917     +304     
==========================================
+ Hits        42604    42746     +142     
- Misses      68009    68171     +162     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Collaborator

@rocketmq-rust-bot rocketmq-rust-bot left a comment

Choose a reason for hiding this comment

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

LGTM - All CI checks passed ✅

Copy link
Owner

@mxsm mxsm left a comment

Choose a reason for hiding this comment

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

LGTM

@mxsm mxsm merged commit 7571b44 into mxsm:main Jan 8, 2026
12 of 21 checks passed
@rocketmq-rust-bot rocketmq-rust-bot added approved PR has approved and removed ready to review waiting-review waiting review this PR labels Jan 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Enhancement✨] Remove useless code from produce_accumulator.rs

4 participants