iamqq23ue commented on code in PR #4306:
URL: https://github.com/apache/rocketmq/pull/4306#discussion_r873666400


##########
store/src/main/java/org/apache/rocketmq/store/MappedFile.java:
##########
@@ -295,13 +295,15 @@ public int flush(final int flushLeastPages) {
 
                 try {
                     //We only append data to fileChannel or mappedByteBuffer, 
never both.
+                    this.flushError = false;
                     if (writeBuffer != null || this.fileChannel.position() != 
0) {
                         this.fileChannel.force(false);
                     } else {
                         this.mappedByteBuffer.force();
                     }
                 } catch (Throwable e) {
                     log.error("Error occurred when force data to disk.", e);
+                    this.flushError = true;

Review Comment:
   @dongeforever According to your idea, maybe changing FLUSH_DISK_TIMEOUT to 
retry send is a better way.
   
   By the way,although storage failure is a very small probability event, the 
loss of data can have serious consequences in important transactions, such as 
the financial field.
   Because this bug I can't say that RocketMQ guarantees that the data will not 
be lost when I choose the architecture. This is the biggest advantage of 
RocketMQ compared to kafka.
   



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