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 #8070] Optimize the submitConsumeRequest and remove unnecessary exception catching #8071
base: develop
Are you sure you want to change the base?
Conversation
If the number of messages or the consumeBatchSize is zero, it will work fine. |
In submitConsumeRequest submitConsumeRequestLater is unnecessary. |
Maven test fails in Ubuntu, but it seems to have nothing to do with this PR. @humkum Can you help me? Thanks! |
Merge develop branch to fix the ut. @biningo |
5efc688
to
b8a638d
Compare
OK, I've merged. Thanks for your help! :) |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #8071 +/- ##
=============================================
- Coverage 42.94% 42.90% -0.05%
+ Complexity 10387 10372 -15
=============================================
Files 1270 1270
Lines 88694 88679 -15
Branches 11401 11397 -4
=============================================
- Hits 38092 38045 -47
- Misses 45914 45940 +26
- Partials 4688 4694 +6 ☔ View full report in Codecov by Sentry. |
this.submitConsumeRequestLater(consumeRequest); | ||
} | ||
} | ||
int batch = ((msgs.size() - 1) / consumeBatchSize) + 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line of code could be clearer. Readability is more important than reducing the number of lines.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh yeah
It's not very readable here. I've optimized it. Thanks for your suggestion.
Which Issue(s) This PR Fixes
Fixes #8070