XiaoyiPeng opened a new issue #3687:
URL: https://github.com/apache/rocketmq/issues/3687


   
   **BUG REPORT**
   
   1. Please describe the issue you observed:
   
       When I read the following code about transaction messages, I noticed a 
problem with the method comments.
    
   ```java
    /**
        * Use this function while transaction msg is committed or rollback 
write a flag 'd' to operation queue for the
        * msg's offset
        *
        * @param messageExt Op message
        * @param messageQueue Op message queue
        * @return This method will always return true.
        */
       private boolean addRemoveTagInTransactionOp(MessageExt messageExt, 
MessageQueue messageQueue) {
           Message message = new 
Message(TransactionalMessageUtil.buildOpTopic(), 
TransactionalMessageUtil.REMOVETAG,
               
String.valueOf(messageExt.getQueueOffset()).getBytes(TransactionalMessageUtil.charset));
           writeOp(message, messageQueue);
           return true;
       }
   ```
      The param `messageExt` of the method is `half message` instead of `Op 
message`.
      The param `messageQueue` of the method is `half message queue` instead of 
`Op message queue`.
   
      I debugged the code,as shown below:
   
![image](https://user-images.githubusercontent.com/8653312/147814486-3876eaa4-f0c6-4ccd-85f9-82ece59671e4.png)
   
   
![image](https://user-images.githubusercontent.com/8653312/147814497-4862883a-009c-4254-bafd-27b16e0b8387.png)
   
       This may mislead others unfamiliar with the code's logic.
   
   2. Please tell us about your environment:
   
        Windows 10.
   


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