lixinwen opened a new issue #615: Transactional message check bug, when user 
set PROPERTY_CHECK_IMMUNITY_TIME_IN_SECONDS
URL: https://github.com/apache/rocketmq/issues/615
 
 
   The issue tracker is **ONLY** used for bug report and feature request. Keep 
in mind, please check whether there is an existing same report before your 
raise a new one.
   
   Alternately (especially if your communication is not a bug report), you can 
send mail to our [mailing lists](http://rocketmq.apache.org/about/contact/). We 
welcome any friendly suggestions, bug fixes, collaboration and other 
improvements.
   
   Please ensure that your bug report is clear and that it is complete. 
Otherwise, we may be unable to understand it or to reproduce it, either of 
which would prevent us from fixing the bug. We strongly recommend the 
report(bug report or feature request) could include some hints as the following:
   
   **BUG REPORT**
   
   1. Please describe the issue you observed:
    In TransactionalMessageServiceImpl#check method, 
    #{code if (needDiscard(msgExt, transactionCheckMax) || needSkip(msgExt))}
    increased checkedTimes of message in #needDiscard method.
    if the user set PROPERTY_CHECK_IMMUNITY_TIME_IN_SECONDS, assume it's a long 
time, 
    message is currently in immune time,  next, in the #checkPrepareQueueOffset 
method, call 
    #putImmunityMsgBackToHalfQueue method, restore the message, and increased 
checkedTimes are 
    included in the new message, repeat the process, when checkedTimes exceed 
the 
    transactionCheckMax, the message will be discard. 
    In this case, I don't think the checkedTimes should be incremented, because 
it's just restore when 
    #{code if (System.currentTimeMillis() - msgExt.getBornTimestamp() < 
checkImmunityTime)}.
   
   - What did you do (The steps to reproduce)?
    Don't increment checkedTimes in #needDiscard method, should in following 
code: 
    in #check methid, 
    if (isNeedCheck) {
           // increment checkedTimes in here
           
msgExt.putUserProperty(MessageConst.PROPERTY_TRANSACTION_CHECK_TIMES, 
           String.valueOf(++checkTime));
           if (!putBackHalfMsgQueue(msgExt, i)) {
                continue;
            }
           listener.resolveHalfMsg(msgExt);
   }   
   
   - What did you expect to see?
   
   - What did you see instead?
   
   2. Please tell us about your environment:
      4.3.2
   
   3. Other information (e.g. detailed explanation, logs, related issues, 
suggestions how to fix, etc):
   
   **FEATURE REQUEST**
   
   1. Please describe the feature you are requesting.
   
   2. Provide any additional detail on your proposed use case for this feature.
   
   2. Indicate the importance of this issue to you (blocker, must-have, 
should-have, nice-to-have). Are you currently using any workarounds to address 
this issue?
   
   4. If there are some sub-tasks using -[] for each subtask and create a 
corresponding issue to map to the sub task:
   
   - [sub-task1-issue-number](example_sub_issue1_link_here): sub-task1 
description here, 
   - [sub-task2-issue-number](example_sub_issue2_link_here): sub-task2 
description here,
   - ...
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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

Reply via email to