ShannonDing commented on a change in pull request #1903: [ISSUE #1904] Print
log when flush timeout
URL: https://github.com/apache/rocketmq/pull/1903#discussion_r402909145
##########
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:
If the disk flashing has failed, and continue to log here, it will increase
the system load and increase disk IO.
IMO, as the status will be sent to the client, it is better to remove the
error log here.
----------------------------------------------------------------
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