caigy commented on a change in pull request #3828:
URL: https://github.com/apache/rocketmq/pull/3828#discussion_r803240040



##########
File path: store/src/main/java/org/apache/rocketmq/store/CommitLog.java
##########
@@ -1143,19 +1135,17 @@ public long getJointime() {
     public static class GroupCommitRequest {
         private final long nextOffset;
         private CompletableFuture<PutMessageStatus> flushOKFuture = new 
CompletableFuture<>();
-        private final long startTimestamp = System.currentTimeMillis();
-        private long timeoutMillis = Long.MAX_VALUE;
+        private final long deadLine;
 
         public GroupCommitRequest(long nextOffset, long timeoutMillis) {
             this.nextOffset = nextOffset;
-            this.timeoutMillis = timeoutMillis;
+            this.deadLine = System.nanoTime() + (timeoutMillis << 20);

Review comment:
       Do you want to approximate `*1000000` by left shift and ignoring some 
precision?




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to