You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2020/01/11 09:57:48 UTC

[GitHub] [rocketmq] liyiwen3 opened a new issue #1714: Why return true where write consume queue fail

liyiwen3 opened a new issue #1714: Why return true where write consume queue fail
URL: https://github.com/apache/rocketmq/issues/1714
 
 
   code like this: 
   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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [rocketmq] moyagit commented on issue #1714: Why return true where write consume queue fail

Posted by GitBox <gi...@apache.org>.
moyagit commented on issue #1714: Why return true where write consume queue fail
URL: https://github.com/apache/rocketmq/issues/1714#issuecomment-573307378
 
 
   +1

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [rocketmq] moyagit commented on issue #1714: Why return true where write consume queue fail

Posted by GitBox <gi...@apache.org>.
moyagit commented on issue #1714: Why return true where write consume queue fail
URL: https://github.com/apache/rocketmq/issues/1714#issuecomment-573306638
 
 
   +1

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services