Skip to content

Commit b6267b9

Browse files
authored
[ISSUE #9486] Fix missing of valueOfCurrentMinusBorn equals checkImmunityTime (#9487)
1 parent 275cc65 commit b6267b9

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

broker/src/main/java/org/apache/rocketmq/broker/transaction/queue/TransactionalMessageServiceImpl.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -277,15 +277,15 @@ public void check(long transactionTimeout, int transactionCheckMax,
277277
String checkImmunityTimeStr = msgExt.getUserProperty(MessageConst.PROPERTY_CHECK_IMMUNITY_TIME_IN_SECONDS);
278278
if (null != checkImmunityTimeStr) {
279279
checkImmunityTime = getImmunityTime(checkImmunityTimeStr, transactionTimeout);
280-
if (valueOfCurrentMinusBorn < checkImmunityTime) {
280+
if (valueOfCurrentMinusBorn <= checkImmunityTime) {
281281
if (checkPrepareQueueOffset(removeMap, doneOpOffset, msgExt, checkImmunityTimeStr)) {
282282
newOffset = i + 1;
283283
i++;
284284
continue;
285285
}
286286
}
287287
} else {
288-
if (0 <= valueOfCurrentMinusBorn && valueOfCurrentMinusBorn < checkImmunityTime) {
288+
if (0 <= valueOfCurrentMinusBorn && valueOfCurrentMinusBorn <= checkImmunityTime) {
289289
log.debug("New arrived, the miss offset={}, check it later checkImmunity={}, born={}", i,
290290
checkImmunityTime, new Date(msgExt.getBornTimestamp()));
291291
break;

0 commit comments

Comments
 (0)