LetLetMe commented on code in PR #8600:
URL: https://github.com/apache/rocketmq/pull/8600#discussion_r1759647553


##########
store/src/main/java/org/apache/rocketmq/store/queue/RocksDBConsumeQueueStore.java:
##########
@@ -164,12 +166,12 @@ private boolean shutdownInner() {
 
     @Override
     public void putMessagePositionInfoWrapper(DispatchRequest request) throws 
RocksDBException {
-        if (request == null || this.bufferDRList.size() >= BATCH_SIZE) {
-            putMessagePosition();
-        }
         if (request != null) {
             this.bufferDRList.add(request);
         }
+        if (request == null || !enableBatchWriteKvCq || 
this.bufferDRList.size() >= BATCH_SIZE) {

Review Comment:
   其实是的,刚发现这个问题时我有点不太确定,为了防止对原有逻辑产生影响,这里加了一个开关。我先在预发测一下看看,没问题的话这里的batch可以直接去掉



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