Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ISSUE #8755] batch send support compression #8746

Open
wants to merge 9 commits into
base: develop
Choose a base branch
from

Conversation

iamgd67
Copy link
Contributor

@iamgd67 iamgd67 commented Sep 25, 2024

closes #8755

Brief Description

by default, DefaultMQProducer will compress message body when body length is longer than 4k, but if send with batch(send( Collection<Message> msgs)), body are not compressed.
this pr compress each message body when average length is larger than 4k

How Did You Test This Change?

send and receive batch messages with 8k body(larger than 4k default compress length), check commit log content is compressed. consume message body is 8k length.

@codecov-commenter
Copy link

codecov-commenter commented Sep 25, 2024

Codecov Report

Attention: Patch coverage is 57.89474% with 16 lines in your changes missing coverage. Please review.

Project coverage is 47.37%. Comparing base (551c8c3) to head (156b9dd).

Files with missing lines Patch % Lines
...mq/client/impl/producer/DefaultMQProducerImpl.java 73.07% 4 Missing and 3 partials ⚠️
...apache/rocketmq/common/message/MessageDecoder.java 33.33% 5 Missing and 1 partial ⚠️
.../apache/rocketmq/test/factory/ConsumerFactory.java 0.00% 3 Missing ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##             develop    #8746      +/-   ##
=============================================
- Coverage      47.37%   47.37%   -0.01%     
+ Complexity     11558    11553       -5     
=============================================
  Files           1282     1282              
  Lines          89864    89890      +26     
  Branches       11563    11568       +5     
=============================================
+ Hits           42575    42587      +12     
- Misses         42040    42048       +8     
- Partials        5249     5255       +6     
Flag Coverage Δ
47.37% <57.89%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@iamgd67 iamgd67 changed the title batch send support compression [issues 8755] batch send support compression Sep 26, 2024
@iamgd67 iamgd67 changed the title [issues 8755] batch send support compression [ISSUE 8755] batch send support compression Sep 26, 2024
@iamgd67 iamgd67 changed the title [ISSUE 8755] batch send support compression [ISSUE #8755] batch send support compression Sep 26, 2024
@iamgd67
Copy link
Contributor Author

iamgd67 commented Sep 26, 2024

ping @lizhimins for review

@iamgd67
Copy link
Contributor Author

iamgd67 commented Sep 29, 2024

ping @RongtongJin for review

@lizhanhui
Copy link
Contributor

  1. An integration test, verifying this feature from end-to-end, should be added.

@iamgd67 iamgd67 force-pushed the feature/batch_send_compression branch 2 times, most recently from 3db2a85 to 22c8c07 Compare September 29, 2024 10:47
@iamgd67 iamgd67 marked this pull request as draft September 30, 2024 03:27
@iamgd67 iamgd67 force-pushed the feature/batch_send_compression branch from b2ebf53 to 7262743 Compare September 30, 2024 03:29
@iamgd67 iamgd67 marked this pull request as ready for review September 30, 2024 06:56
@iamgd67
Copy link
Contributor Author

iamgd67 commented Sep 30, 2024

@lizhanhui integration test added and passed

@iamgd67
Copy link
Contributor Author

iamgd67 commented Oct 9, 2024

ping @lollipopjin for review

@iamgd67
Copy link
Contributor Author

iamgd67 commented Oct 10, 2024

ping @RongtongJin for review

@iamgd67
Copy link
Contributor Author

iamgd67 commented Oct 22, 2024

@RongtongJin @fuyou001 @tianliuliu @lollipopjin @lizhanhui please review this, thanks.

@iamgd67
Copy link
Contributor Author

iamgd67 commented Nov 1, 2024

@RongtongJin @fuyou001 @tianliuliu @lollipopjin @lizhanhui please review this, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Enhancement] batch send support compression 批量发送支持压缩
3 participants