lollipopjin commented on code in PR #10470:
URL: https://github.com/apache/rocketmq/pull/10470#discussion_r3392966578
##########
tieredstore/src/main/java/org/apache/rocketmq/tieredstore/core/MessageStoreDispatcherImpl.java:
##########
@@ -97,16 +93,28 @@ public Map<FlatFileInterface, GroupCommitContext>
getFailedGroupCommitMap() {
return failedGroupCommitMap;
}
- public void dispatchWithSemaphore(FlatFileInterface flatFile) {
+ protected boolean isMemoryEnough(FlatFileInterface flatFile) {
Review Comment:
The isMemoryEnough() method is the core of this backpressure mechanism but
has no unit tests. Could you add tests covering: (1) dispatch proceeds when
memory is sufficient, (2) dispatch is skipped with warn log when memory is
below threshold, (3) threshold calculation respects both ratio and maxBytes cap?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]