Skip to content

Commit

Permalink
事务消息, 回查判断OP_HALF_QUEUE 消息是否在HALF_QUEUE中,优化判断方式。
Browse files Browse the repository at this point in the history
Transaction message, check back to determine if the OP-HALF-QUEUE message is in HALF-QUEUE, optimize the judgment method
  • Loading branch information
TangJie committed Dec 18, 2024
1 parent 72ac17b commit a973120
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -197,13 +197,13 @@ public void check(long transactionTimeout, int transactionCheckMax,
long nextOpOffset = pullResult.getNextBeginOffset();
int putInQueueCount = 0;
int escapeFailCnt = 0;
Long removedOpOffset;

while (true) {
if (System.currentTimeMillis() - startTime > MAX_PROCESS_TIME_LIMIT) {
log.info("Queue={} process time reach max={}", messageQueue, MAX_PROCESS_TIME_LIMIT);
break;
}
Long removedOpOffset;
if ((removedOpOffset = removeMap.remove(i)) != null) {
log.debug("Half offset {} has been committed/rolled back", i);
opMsgMap.get(removedOpOffset).remove(i);
Expand Down

0 comments on commit a973120

Please sign in to comment.