echooymxq commented on code in PR #6623:
URL: https://github.com/apache/rocketmq/pull/6623#discussion_r1174745036


##########
broker/src/main/java/org/apache/rocketmq/broker/processor/PopBufferMergeService.java:
##########
@@ -402,9 +402,14 @@ private boolean checkQueueOk(PopCheckPointWrapper 
pointWrapper) {
      * @param nextBeginOffset
      * @return
      */
-    public void addCkJustOffset(PopCheckPoint point, int reviveQueueId, long 
reviveQueueOffset, long nextBeginOffset) {
+    public boolean addCkJustOffset(PopCheckPoint point, int reviveQueueId, 
long reviveQueueOffset, long nextBeginOffset) {
         PopCheckPointWrapper pointWrapper = new 
PopCheckPointWrapper(reviveQueueId, reviveQueueOffset, point, nextBeginOffset, 
true);
 
+        if (this.counter.get() > 
brokerController.getBrokerConfig().getPopCkMaxBufferSize()) {

Review Comment:
   Yeah, if the buffer full, because the limit condition, the add ck to buffer 
will be failed, but the `addCkJustOffset ` will add buffer success. So i add 
the condition to here to avoid it can always add success.
   what's more if the memory ack not enable.



-- 
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]

Reply via email to