You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2022/02/11 01:37:19 UTC

[GitHub] [rocketmq] caigy commented on a change in pull request #3828: [ISSUE #3827]Improve Performance of Transactional Message

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: dev-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org