YongGoose commented on code in PR #7133: URL: https://github.com/apache/incubator-seata/pull/7133#discussion_r1956314769
########## server/src/main/java/org/apache/seata/server/session/GlobalSession.java: ########## @@ -204,9 +204,17 @@ public boolean isTimeout() { /** * prevent could not handle committing and rollbacking transaction + * + * If the global session's status is "Rollbacked" or "TimeoutRollbacked", it returns the negative time since the session began, + * indicating that the session is already dead. + * For other statuses, it returns the remaining time until the session reaches the retry dead threshold. + * * @return time to dead session. if not greater than 0, then deadSession */ public long timeToDeadSession() { + if (this.status == GlobalStatus.Rollbacked || this.status == GlobalStatus.TimeoutRollbacked) { + return beginTime - System.currentTimeMillis(); Review Comment: Done in https://github.com/apache/incubator-seata/pull/7133/commits/997775c07c4e946b39e4cc85cd9a42dc79c3d145 ! PTAL ⚡️ -- 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: notifications-unsubscr...@seata.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@seata.apache.org For additional commands, e-mail: notifications-h...@seata.apache.org