iamqq23ue opened a new issue, #4159:
URL: https://github.com/apache/rocketmq/issues/4159

   version 4.9.1
   
   From the ReputMessageService code, we can finally locate the following code。 
“this.fileChannel.write(ByteBuffer.wrap(data));” is already possible to write 
data to disk, why do we need FlushConsumeQueueService?
   ————————————————————————————————————————————
   public boolean appendMessage(final byte[] data) {
       int currentPos = this.wrotePosition.get();
   
       if ((currentPos + data.length) <= this.fileSize) {
           try {
               this.fileChannel.position(currentPos);
               this.fileChannel.write(ByteBuffer.wrap(data));
           } catch (Throwable e) {
               log.error("Error occurred when append message to mappedFile.", 
e);
           }
           this.wrotePosition.addAndGet(data.length);
           return true;
       }
   
       return false;
   }
   ——————————————————————————————————————
   
   


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