rushsky518 commented on a change in pull request #1903: [ISSUE #1904] Print log 
when flush timeout
URL: https://github.com/apache/rocketmq/pull/1903#discussion_r403074273
 
 

 ##########
 File path: store/src/main/java/org/apache/rocketmq/store/CommitLog.java
 ##########
 @@ -761,15 +767,20 @@ public long getBeginTimeInLock() {
         
storeStatsService.getSinglePutMessageTopicTimesTotal(messageExtBatch.getTopic()).addAndGet(result.getMsgNum());
         
storeStatsService.getSinglePutMessageTopicSizeTotal(messageExtBatch.getTopic()).addAndGet(result.getWroteBytes());
 
-        CompletableFuture<PutMessageStatus> flushOKFuture = 
submitFlushRequest(result, putMessageResult, messageExtBatch);
-        CompletableFuture<PutMessageStatus> replicaOKFuture = 
submitReplicaRequest(result, putMessageResult, messageExtBatch);
+        CompletableFuture<PutMessageStatus> flushOKFuture = 
submitFlushRequest(result, messageExtBatch);
+        CompletableFuture<PutMessageStatus> replicaOKFuture = 
submitReplicaRequest(result, messageExtBatch);
         return flushOKFuture.thenCombine(replicaOKFuture, (flushStatus, 
replicaStatus) -> {
             if (flushStatus != PutMessageStatus.PUT_OK) {
-                
putMessageResult.setPutMessageStatus(PutMessageStatus.FLUSH_DISK_TIMEOUT);
+                putMessageResult.setPutMessageStatus(flushStatus);
+                log.error("do groupcommit, wait for flush failed, topic: {} 
tags: {} client address: {}",
 
 Review comment:
   Indeed so.
   I still have a question about [#1894 pr]
   ````java
   req.wakeupCustomer(flushOK ? PutMessageStatus.PUT_OK : 
PutMessageStatus.FLUSH_DISK_TIMEOUT);
   ````
   flushOK is false means FLUSH_DISK_TIMEOUT? 

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to