This is an automated email from the ASF dual-hosted git repository.

dataroaring pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/master by this push:
     new af20d0c521 [fix](binlog) Fix BinlogUtils getExpiredMs overflow (#22174)
af20d0c521 is described below

commit af20d0c52181402db4680f77fef8aa6e5fb46627
Author: Jack Drogon <jack.xsuper...@gmail.com>
AuthorDate: Wed Jul 26 15:15:34 2023 +0800

    [fix](binlog) Fix BinlogUtils getExpiredMs overflow (#22174)
---
 fe/fe-core/src/main/java/org/apache/doris/binlog/BinlogUtils.java | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/fe/fe-core/src/main/java/org/apache/doris/binlog/BinlogUtils.java 
b/fe/fe-core/src/main/java/org/apache/doris/binlog/BinlogUtils.java
index 3af4053ef1..30cbfd0e15 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/binlog/BinlogUtils.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/binlog/BinlogUtils.java
@@ -119,6 +119,10 @@ public class BinlogUtils {
 
     public static long getExpiredMs(long ttlSeconds) {
         long currentSeconds = System.currentTimeMillis() / 1000;
+        if (currentSeconds < ttlSeconds) {
+            return Long.MIN_VALUE;
+        }
+
         long expireSeconds = currentSeconds - ttlSeconds;
         return expireSeconds * 1000;
     }


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to