rocketmq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vongosl...@apache.org
Subject [rocketmq] branch develop updated: [ISSUE #1308] Fix some spelling errors of method names. (#1307)
Date Mon, 15 Jul 2019 07:44:19 GMT
This is an automated email from the ASF dual-hosted git repository.

vongosling pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/rocketmq.git


The following commit(s) were added to refs/heads/develop by this push:
     new be7c6dd  [ISSUE #1308] Fix some spelling errors of method names. (#1307)
be7c6dd is described below

commit be7c6dd219c250a289ebf7d6d23d2a2b61f32f70
Author: xiangGuo <mzygdeaq@qq.com>
AuthorDate: Mon Jul 15 15:44:10 2019 +0800

    [ISSUE #1308] Fix some spelling errors of method names. (#1307)
---
 .../org/apache/rocketmq/broker/BrokerController.java |  2 +-
 .../broker/filter/CommitLogDispatcherCalcBitMap.java |  7 ++++---
 .../org/apache/rocketmq/common/ServiceThread.java    |  4 ++--
 .../java/org/apache/rocketmq/common/UtilAll.java     | 10 +++++-----
 .../rocketmq/common/stats/MomentStatsItem.java       |  2 +-
 .../rocketmq/common/stats/MomentStatsItemSet.java    |  2 +-
 .../org/apache/rocketmq/common/stats/StatsItem.java  |  6 +++---
 .../apache/rocketmq/common/stats/StatsItemSet.java   |  6 +++---
 .../protocol/QueryConsumeTimeSpanBodyTest.java       |  4 ++--
 .../rocketmq/remoting/common/ServiceThread.java      |  4 ++--
 .../rocketmq/store/AllocateMappedFileService.java    |  6 +++---
 .../java/org/apache/rocketmq/store/CommitLog.java    | 16 ++++++++--------
 .../apache/rocketmq/store/DefaultMessageStore.java   | 20 ++++++++++----------
 .../java/org/apache/rocketmq/store/MappedFile.java   |  2 +-
 .../rocketmq/store/dledger/DLedgerCommitLog.java     | 10 +++++-----
 .../org/apache/rocketmq/store/index/IndexFile.java   |  2 +-
 16 files changed, 52 insertions(+), 51 deletions(-)

diff --git a/broker/src/main/java/org/apache/rocketmq/broker/BrokerController.java b/broker/src/main/java/org/apache/rocketmq/broker/BrokerController.java
index 56e3fe4..a885cd0 100644
--- a/broker/src/main/java/org/apache/rocketmq/broker/BrokerController.java
+++ b/broker/src/main/java/org/apache/rocketmq/broker/BrokerController.java
@@ -319,7 +319,7 @@ public class BrokerController {
 
             this.registerProcessor();
 
-            final long initialDelay = UtilAll.computNextMorningTimeMillis() - System.currentTimeMillis();
+            final long initialDelay = UtilAll.computeNextMorningTimeMillis() - System.currentTimeMillis();
             final long period = 1000 * 60 * 60 * 24;
             this.scheduledExecutorService.scheduleAtFixedRate(new Runnable() {
                 @Override
diff --git a/broker/src/main/java/org/apache/rocketmq/broker/filter/CommitLogDispatcherCalcBitMap.java
b/broker/src/main/java/org/apache/rocketmq/broker/filter/CommitLogDispatcherCalcBitMap.java
index 288351f..d82c53f 100644
--- a/broker/src/main/java/org/apache/rocketmq/broker/filter/CommitLogDispatcherCalcBitMap.java
+++ b/broker/src/main/java/org/apache/rocketmq/broker/filter/CommitLogDispatcherCalcBitMap.java
@@ -18,6 +18,7 @@
 package org.apache.rocketmq.broker.filter;
 
 import org.apache.rocketmq.common.BrokerConfig;
+import org.apache.rocketmq.common.UtilAll;
 import org.apache.rocketmq.common.constant.LoggerName;
 import org.apache.rocketmq.logging.InternalLogger;
 import org.apache.rocketmq.logging.InternalLoggerFactory;
@@ -98,10 +99,10 @@ public class CommitLogDispatcherCalcBitMap implements CommitLogDispatcher
{
 
             request.setBitMap(filterBitMap.bytes());
 
-            long eclipseTime = System.currentTimeMillis() - startTime;
+            long elapsedTime = UtilAll.computeElapsedTimeMilliseconds(startTime);
             // 1ms
-            if (eclipseTime >= 1) {
-                log.warn("Spend {} ms to calc bit map, consumerNum={}, topic={}", eclipseTime,
filterDatas.size(), request.getTopic());
+            if (elapsedTime >= 1) {
+                log.warn("Spend {} ms to calc bit map, consumerNum={}, topic={}", elapsedTime,
filterDatas.size(), request.getTopic());
             }
         } catch (Throwable e) {
             log.error("Calc bit map error! topic={}, offset={}, queueId={}, {}", request.getTopic(),
request.getCommitLogOffset(), request.getQueueId(), e);
diff --git a/common/src/main/java/org/apache/rocketmq/common/ServiceThread.java b/common/src/main/java/org/apache/rocketmq/common/ServiceThread.java
index ae46e78..ead8117 100644
--- a/common/src/main/java/org/apache/rocketmq/common/ServiceThread.java
+++ b/common/src/main/java/org/apache/rocketmq/common/ServiceThread.java
@@ -78,8 +78,8 @@ public abstract class ServiceThread implements Runnable {
             if (!this.thread.isDaemon()) {
                 this.thread.join(this.getJointime());
             }
-            long eclipseTime = System.currentTimeMillis() - beginTime;
-            log.info("join thread " + this.getServiceName() + " eclipse time(ms) " + eclipseTime
+ " "
+            long elapsedTime = System.currentTimeMillis() - beginTime;
+            log.info("join thread " + this.getServiceName() + " elapsed time(ms) " + elapsedTime
+ " "
                 + this.getJointime());
         } catch (InterruptedException e) {
             log.error("Interrupted", e);
diff --git a/common/src/main/java/org/apache/rocketmq/common/UtilAll.java b/common/src/main/java/org/apache/rocketmq/common/UtilAll.java
index 33674dc..68d93f3 100644
--- a/common/src/main/java/org/apache/rocketmq/common/UtilAll.java
+++ b/common/src/main/java/org/apache/rocketmq/common/UtilAll.java
@@ -93,7 +93,7 @@ public class UtilAll {
         return nf.format(offset);
     }
 
-    public static long computeEclipseTimeMilliseconds(final long beginTime) {
+    public static long computeElapsedTimeMilliseconds(final long beginTime) {
         return System.currentTimeMillis() - beginTime;
     }
 
@@ -124,7 +124,7 @@ public class UtilAll {
             cal.get(Calendar.MILLISECOND));
     }
 
-    public static long computNextMorningTimeMillis() {
+    public static long computeNextMorningTimeMillis() {
         Calendar cal = Calendar.getInstance();
         cal.setTimeInMillis(System.currentTimeMillis());
         cal.add(Calendar.DAY_OF_MONTH, 1);
@@ -136,7 +136,7 @@ public class UtilAll {
         return cal.getTimeInMillis();
     }
 
-    public static long computNextMinutesTimeMillis() {
+    public static long computeNextMinutesTimeMillis() {
         Calendar cal = Calendar.getInstance();
         cal.setTimeInMillis(System.currentTimeMillis());
         cal.add(Calendar.DAY_OF_MONTH, 0);
@@ -148,7 +148,7 @@ public class UtilAll {
         return cal.getTimeInMillis();
     }
 
-    public static long computNextHourTimeMillis() {
+    public static long computeNextHourTimeMillis() {
         Calendar cal = Calendar.getInstance();
         cal.setTimeInMillis(System.currentTimeMillis());
         cal.add(Calendar.DAY_OF_MONTH, 0);
@@ -160,7 +160,7 @@ public class UtilAll {
         return cal.getTimeInMillis();
     }
 
-    public static long computNextHalfHourTimeMillis() {
+    public static long computeNextHalfHourTimeMillis() {
         Calendar cal = Calendar.getInstance();
         cal.setTimeInMillis(System.currentTimeMillis());
         cal.add(Calendar.DAY_OF_MONTH, 0);
diff --git a/common/src/main/java/org/apache/rocketmq/common/stats/MomentStatsItem.java b/common/src/main/java/org/apache/rocketmq/common/stats/MomentStatsItem.java
index 99f16f5..bc987b1 100644
--- a/common/src/main/java/org/apache/rocketmq/common/stats/MomentStatsItem.java
+++ b/common/src/main/java/org/apache/rocketmq/common/stats/MomentStatsItem.java
@@ -51,7 +51,7 @@ public class MomentStatsItem {
                 } catch (Throwable e) {
                 }
             }
-        }, Math.abs(UtilAll.computNextMinutesTimeMillis() - System.currentTimeMillis()),
1000 * 60 * 5, TimeUnit.MILLISECONDS);
+        }, Math.abs(UtilAll.computeNextMinutesTimeMillis() - System.currentTimeMillis()),
1000 * 60 * 5, TimeUnit.MILLISECONDS);
     }
 
     public void printAtMinutes() {
diff --git a/common/src/main/java/org/apache/rocketmq/common/stats/MomentStatsItemSet.java
b/common/src/main/java/org/apache/rocketmq/common/stats/MomentStatsItemSet.java
index a38b53f..7ff26cd 100644
--- a/common/src/main/java/org/apache/rocketmq/common/stats/MomentStatsItemSet.java
+++ b/common/src/main/java/org/apache/rocketmq/common/stats/MomentStatsItemSet.java
@@ -58,7 +58,7 @@ public class MomentStatsItemSet {
                 } catch (Throwable ignored) {
                 }
             }
-        }, Math.abs(UtilAll.computNextMinutesTimeMillis() - System.currentTimeMillis()),
1000 * 60 * 5, TimeUnit.MILLISECONDS);
+        }, Math.abs(UtilAll.computeNextMinutesTimeMillis() - System.currentTimeMillis()),
1000 * 60 * 5, TimeUnit.MILLISECONDS);
     }
 
     private void printAtMinutes() {
diff --git a/common/src/main/java/org/apache/rocketmq/common/stats/StatsItem.java b/common/src/main/java/org/apache/rocketmq/common/stats/StatsItem.java
index 210e578..bd575ba 100644
--- a/common/src/main/java/org/apache/rocketmq/common/stats/StatsItem.java
+++ b/common/src/main/java/org/apache/rocketmq/common/stats/StatsItem.java
@@ -127,7 +127,7 @@ public class StatsItem {
                 } catch (Throwable ignored) {
                 }
             }
-        }, Math.abs(UtilAll.computNextMinutesTimeMillis() - System.currentTimeMillis()),
1000 * 60, TimeUnit.MILLISECONDS);
+        }, Math.abs(UtilAll.computeNextMinutesTimeMillis() - System.currentTimeMillis()),
1000 * 60, TimeUnit.MILLISECONDS);
 
         this.scheduledExecutorService.scheduleAtFixedRate(new Runnable() {
             @Override
@@ -137,7 +137,7 @@ public class StatsItem {
                 } catch (Throwable ignored) {
                 }
             }
-        }, Math.abs(UtilAll.computNextHourTimeMillis() - System.currentTimeMillis()), 1000
* 60 * 60, TimeUnit.MILLISECONDS);
+        }, Math.abs(UtilAll.computeNextHourTimeMillis() - System.currentTimeMillis()), 1000
* 60 * 60, TimeUnit.MILLISECONDS);
 
         this.scheduledExecutorService.scheduleAtFixedRate(new Runnable() {
             @Override
@@ -147,7 +147,7 @@ public class StatsItem {
                 } catch (Throwable ignored) {
                 }
             }
-        }, Math.abs(UtilAll.computNextMorningTimeMillis() - System.currentTimeMillis()) -
2000, 1000 * 60 * 60 * 24, TimeUnit.MILLISECONDS);
+        }, Math.abs(UtilAll.computeNextMorningTimeMillis() - System.currentTimeMillis())
- 2000, 1000 * 60 * 60 * 24, TimeUnit.MILLISECONDS);
     }
 
     public void samplingInSeconds() {
diff --git a/common/src/main/java/org/apache/rocketmq/common/stats/StatsItemSet.java b/common/src/main/java/org/apache/rocketmq/common/stats/StatsItemSet.java
index b368651..1c2de33 100644
--- a/common/src/main/java/org/apache/rocketmq/common/stats/StatsItemSet.java
+++ b/common/src/main/java/org/apache/rocketmq/common/stats/StatsItemSet.java
@@ -81,7 +81,7 @@ public class StatsItemSet {
                 } catch (Throwable ignored) {
                 }
             }
-        }, Math.abs(UtilAll.computNextMinutesTimeMillis() - System.currentTimeMillis()),
1000 * 60, TimeUnit.MILLISECONDS);
+        }, Math.abs(UtilAll.computeNextMinutesTimeMillis() - System.currentTimeMillis()),
1000 * 60, TimeUnit.MILLISECONDS);
 
         this.scheduledExecutorService.scheduleAtFixedRate(new Runnable() {
             @Override
@@ -91,7 +91,7 @@ public class StatsItemSet {
                 } catch (Throwable ignored) {
                 }
             }
-        }, Math.abs(UtilAll.computNextHourTimeMillis() - System.currentTimeMillis()), 1000
* 60 * 60, TimeUnit.MILLISECONDS);
+        }, Math.abs(UtilAll.computeNextHourTimeMillis() - System.currentTimeMillis()), 1000
* 60 * 60, TimeUnit.MILLISECONDS);
 
         this.scheduledExecutorService.scheduleAtFixedRate(new Runnable() {
             @Override
@@ -101,7 +101,7 @@ public class StatsItemSet {
                 } catch (Throwable ignored) {
                 }
             }
-        }, Math.abs(UtilAll.computNextMorningTimeMillis() - System.currentTimeMillis()),
1000 * 60 * 60 * 24, TimeUnit.MILLISECONDS);
+        }, Math.abs(UtilAll.computeNextMorningTimeMillis() - System.currentTimeMillis()),
1000 * 60 * 60 * 24, TimeUnit.MILLISECONDS);
     }
 
     private void samplingInSeconds() {
diff --git a/common/src/test/java/org/apache/rocketmq/common/protocol/QueryConsumeTimeSpanBodyTest.java
b/common/src/test/java/org/apache/rocketmq/common/protocol/QueryConsumeTimeSpanBodyTest.java
index fb747b3..76844d9 100644
--- a/common/src/test/java/org/apache/rocketmq/common/protocol/QueryConsumeTimeSpanBodyTest.java
+++ b/common/src/test/java/org/apache/rocketmq/common/protocol/QueryConsumeTimeSpanBodyTest.java
@@ -103,8 +103,8 @@ public class QueryConsumeTimeSpanBodyTest {
         List<QueueTimeSpan> queueTimeSpans = new ArrayList<QueueTimeSpan>();
         QueueTimeSpan queueTimeSpan = new QueueTimeSpan();
         queueTimeSpan.setMinTimeStamp(System.currentTimeMillis());
-        queueTimeSpan.setMaxTimeStamp(UtilAll.computNextHourTimeMillis());
-        queueTimeSpan.setConsumeTimeStamp(UtilAll.computNextMinutesTimeMillis());
+        queueTimeSpan.setMaxTimeStamp(UtilAll.computeNextHourTimeMillis());
+        queueTimeSpan.setConsumeTimeStamp(UtilAll.computeNextMinutesTimeMillis());
         queueTimeSpan.setDelayTime(5000l);
         MessageQueue messageQueue = new MessageQueue(UUID.randomUUID().toString(), UUID.randomUUID().toString(),
new Random().nextInt());
         queueTimeSpan.setMessageQueue(messageQueue);
diff --git a/remoting/src/main/java/org/apache/rocketmq/remoting/common/ServiceThread.java
b/remoting/src/main/java/org/apache/rocketmq/remoting/common/ServiceThread.java
index 7a383e4..21fd0ef 100644
--- a/remoting/src/main/java/org/apache/rocketmq/remoting/common/ServiceThread.java
+++ b/remoting/src/main/java/org/apache/rocketmq/remoting/common/ServiceThread.java
@@ -62,8 +62,8 @@ public abstract class ServiceThread implements Runnable {
 
             long beginTime = System.currentTimeMillis();
             this.thread.join(this.getJointime());
-            long eclipseTime = System.currentTimeMillis() - beginTime;
-            log.info("join thread " + this.getServiceName() + " eclipse time(ms) " + eclipseTime
+ " "
+            long elapsedTime = System.currentTimeMillis() - beginTime;
+            log.info("join thread " + this.getServiceName() + " elapsed time(ms) " + elapsedTime
+ " "
                 + this.getJointime());
         } catch (InterruptedException e) {
             log.error("Interrupted", e);
diff --git a/store/src/main/java/org/apache/rocketmq/store/AllocateMappedFileService.java
b/store/src/main/java/org/apache/rocketmq/store/AllocateMappedFileService.java
index 5323670..acb1d54 100644
--- a/store/src/main/java/org/apache/rocketmq/store/AllocateMappedFileService.java
+++ b/store/src/main/java/org/apache/rocketmq/store/AllocateMappedFileService.java
@@ -176,10 +176,10 @@ public class AllocateMappedFileService extends ServiceThread {
                     mappedFile = new MappedFile(req.getFilePath(), req.getFileSize());
                 }
 
-                long eclipseTime = UtilAll.computeEclipseTimeMilliseconds(beginTime);
-                if (eclipseTime > 10) {
+                long elapsedTime = UtilAll.computeElapsedTimeMilliseconds(beginTime);
+                if (elapsedTime > 10) {
                     int queueSize = this.requestQueue.size();
-                    log.warn("create mappedFile spent time(ms) " + eclipseTime + " queue
size " + queueSize
+                    log.warn("create mappedFile spent time(ms) " + elapsedTime + " queue
size " + queueSize
                         + " " + req.getFilePath() + " " + req.getFileSize());
                 }
 
diff --git a/store/src/main/java/org/apache/rocketmq/store/CommitLog.java b/store/src/main/java/org/apache/rocketmq/store/CommitLog.java
index b0bf8bb..2ab66e8 100644
--- a/store/src/main/java/org/apache/rocketmq/store/CommitLog.java
+++ b/store/src/main/java/org/apache/rocketmq/store/CommitLog.java
@@ -569,7 +569,7 @@ public class CommitLog {
             }
         }
 
-        long eclipseTimeInLock = 0;
+        long elapsedTimeInLock = 0;
         MappedFile unlockMappedFile = null;
         MappedFile mappedFile = this.mappedFileQueue.getLastMappedFile();
 
@@ -619,14 +619,14 @@ public class CommitLog {
                     return new PutMessageResult(PutMessageStatus.UNKNOWN_ERROR, result);
             }
 
-            eclipseTimeInLock = this.defaultMessageStore.getSystemClock().now() - beginLockTimestamp;
+            elapsedTimeInLock = this.defaultMessageStore.getSystemClock().now() - beginLockTimestamp;
             beginTimeInLock = 0;
         } finally {
             putMessageLock.unlock();
         }
 
-        if (eclipseTimeInLock > 500) {
-            log.warn("[NOTIFYME]putMessage in lock cost time(ms)={}, bodyLength={} AppendMessageResult={}",
eclipseTimeInLock, msg.getBody().length, result);
+        if (elapsedTimeInLock > 500) {
+            log.warn("[NOTIFYME]putMessage in lock cost time(ms)={}, bodyLength={} AppendMessageResult={}",
elapsedTimeInLock, msg.getBody().length, result);
         }
 
         if (null != unlockMappedFile && this.defaultMessageStore.getMessageStoreConfig().isWarmMapedFileEnable())
{
@@ -714,7 +714,7 @@ public class CommitLog {
             return new PutMessageResult(PutMessageStatus.MESSAGE_ILLEGAL, null);
         }
 
-        long eclipseTimeInLock = 0;
+        long elapsedTimeInLock = 0;
         MappedFile unlockMappedFile = null;
         MappedFile mappedFile = this.mappedFileQueue.getLastMappedFile();
 
@@ -769,14 +769,14 @@ public class CommitLog {
                     return new PutMessageResult(PutMessageStatus.UNKNOWN_ERROR, result);
             }
 
-            eclipseTimeInLock = this.defaultMessageStore.getSystemClock().now() - beginLockTimestamp;
+            elapsedTimeInLock = this.defaultMessageStore.getSystemClock().now() - beginLockTimestamp;
             beginTimeInLock = 0;
         } finally {
             putMessageLock.unlock();
         }
 
-        if (eclipseTimeInLock > 500) {
-            log.warn("[NOTIFYME]putMessages in lock cost time(ms)={}, bodyLength={} AppendMessageResult={}",
eclipseTimeInLock, messageExtBatch.getBody().length, result);
+        if (elapsedTimeInLock > 500) {
+            log.warn("[NOTIFYME]putMessages in lock cost time(ms)={}, bodyLength={} AppendMessageResult={}",
elapsedTimeInLock, messageExtBatch.getBody().length, result);
         }
 
         if (null != unlockMappedFile && this.defaultMessageStore.getMessageStoreConfig().isWarmMapedFileEnable())
{
diff --git a/store/src/main/java/org/apache/rocketmq/store/DefaultMessageStore.java b/store/src/main/java/org/apache/rocketmq/store/DefaultMessageStore.java
index f539411..971b1e7 100644
--- a/store/src/main/java/org/apache/rocketmq/store/DefaultMessageStore.java
+++ b/store/src/main/java/org/apache/rocketmq/store/DefaultMessageStore.java
@@ -394,11 +394,11 @@ public class DefaultMessageStore implements MessageStore {
         long beginTime = this.getSystemClock().now();
         PutMessageResult result = this.commitLog.putMessage(msg);
 
-        long eclipseTime = this.getSystemClock().now() - beginTime;
-        if (eclipseTime > 500) {
-            log.warn("putMessage not in lock eclipse time(ms)={}, bodyLength={}", eclipseTime,
msg.getBody().length);
+        long elapsedTime = this.getSystemClock().now() - beginTime;
+        if (elapsedTime > 500) {
+            log.warn("putMessage not in lock elapsed time(ms)={}, bodyLength={}", elapsedTime,
msg.getBody().length);
         }
-        this.storeStatsService.setPutMessageEntireTimeMax(eclipseTime);
+        this.storeStatsService.setPutMessageEntireTimeMax(elapsedTime);
 
         if (null == result || !result.isOk()) {
             this.storeStatsService.getPutMessageFailedTimes().incrementAndGet();
@@ -450,11 +450,11 @@ public class DefaultMessageStore implements MessageStore {
         long beginTime = this.getSystemClock().now();
         PutMessageResult result = this.commitLog.putMessages(messageExtBatch);
 
-        long eclipseTime = this.getSystemClock().now() - beginTime;
-        if (eclipseTime > 500) {
-            log.warn("not in lock eclipse time(ms)={}, bodyLength={}", eclipseTime, messageExtBatch.getBody().length);
+        long elapsedTime = this.getSystemClock().now() - beginTime;
+        if (elapsedTime > 500) {
+            log.warn("not in lock elapsed time(ms)={}, bodyLength={}", elapsedTime, messageExtBatch.getBody().length);
         }
-        this.storeStatsService.setPutMessageEntireTimeMax(eclipseTime);
+        this.storeStatsService.setPutMessageEntireTimeMax(elapsedTime);
 
         if (null == result || !result.isOk()) {
             this.storeStatsService.getPutMessageFailedTimes().incrementAndGet();
@@ -642,8 +642,8 @@ public class DefaultMessageStore implements MessageStore {
         } else {
             this.storeStatsService.getGetMessageTimesTotalMiss().incrementAndGet();
         }
-        long eclipseTime = this.getSystemClock().now() - beginTime;
-        this.storeStatsService.setGetMessageEntireTimeMax(eclipseTime);
+        long elapsedTime = this.getSystemClock().now() - beginTime;
+        this.storeStatsService.setGetMessageEntireTimeMax(elapsedTime);
 
         getResult.setStatus(status);
         getResult.setNextBeginOffset(nextBeginOffset);
diff --git a/store/src/main/java/org/apache/rocketmq/store/MappedFile.java b/store/src/main/java/org/apache/rocketmq/store/MappedFile.java
index e2c1d16..9185d21 100644
--- a/store/src/main/java/org/apache/rocketmq/store/MappedFile.java
+++ b/store/src/main/java/org/apache/rocketmq/store/MappedFile.java
@@ -448,7 +448,7 @@ public class MappedFile extends ReferenceResource {
                 log.info("delete file[REF:" + this.getRefCount() + "] " + this.fileName
                     + (result ? " OK, " : " Failed, ") + "W:" + this.getWrotePosition() +
" M:"
                     + this.getFlushedPosition() + ", "
-                    + UtilAll.computeEclipseTimeMilliseconds(beginTime));
+                    + UtilAll.computeElapsedTimeMilliseconds(beginTime));
             } catch (Exception e) {
                 log.warn("close file channel " + this.fileName + " Failed. ", e);
             }
diff --git a/store/src/main/java/org/apache/rocketmq/store/dledger/DLedgerCommitLog.java b/store/src/main/java/org/apache/rocketmq/store/dledger/DLedgerCommitLog.java
index 8f795d9..17be11b 100644
--- a/store/src/main/java/org/apache/rocketmq/store/dledger/DLedgerCommitLog.java
+++ b/store/src/main/java/org/apache/rocketmq/store/dledger/DLedgerCommitLog.java
@@ -411,7 +411,7 @@ public class DLedgerCommitLog extends CommitLog {
         EncodeResult encodeResult;
 
         putMessageLock.lock(); //spin or ReentrantLock ,depending on store config
-        long eclipseTimeInLock;
+        long elapsedTimeInLock;
         long queueOffset;
         try {
             beginTimeInDledgerLock =  this.defaultMessageStore.getSystemClock().now();
@@ -431,8 +431,8 @@ public class DLedgerCommitLog extends CommitLog {
             long wroteOffset =  dledgerFuture.getPos() + DLedgerEntry.BODY_OFFSET;
             ByteBuffer buffer = ByteBuffer.allocate(MessageDecoder.MSG_ID_LENGTH);
             String msgId = MessageDecoder.createMessageId(buffer, msg.getStoreHostBytes(),
wroteOffset);
-            eclipseTimeInLock = this.defaultMessageStore.getSystemClock().now() - beginTimeInDledgerLock;
-            appendResult = new AppendMessageResult(AppendMessageStatus.PUT_OK, wroteOffset,
encodeResult.data.length, msgId, System.currentTimeMillis(), queueOffset, eclipseTimeInLock);
+            elapsedTimeInLock = this.defaultMessageStore.getSystemClock().now() - beginTimeInDledgerLock;
+            appendResult = new AppendMessageResult(AppendMessageStatus.PUT_OK, wroteOffset,
encodeResult.data.length, msgId, System.currentTimeMillis(), queueOffset, elapsedTimeInLock);
             switch (tranType) {
                 case MessageSysFlag.TRANSACTION_PREPARED_TYPE:
                 case MessageSysFlag.TRANSACTION_ROLLBACK_TYPE:
@@ -453,8 +453,8 @@ public class DLedgerCommitLog extends CommitLog {
             putMessageLock.unlock();
         }
 
-        if (eclipseTimeInLock > 500) {
-            log.warn("[NOTIFYME]putMessage in lock cost time(ms)={}, bodyLength={} AppendMessageResult={}",
eclipseTimeInLock, msg.getBody().length, appendResult);
+        if (elapsedTimeInLock > 500) {
+            log.warn("[NOTIFYME]putMessage in lock cost time(ms)={}, bodyLength={} AppendMessageResult={}",
elapsedTimeInLock, msg.getBody().length, appendResult);
         }
 
         PutMessageStatus putMessageStatus = PutMessageStatus.UNKNOWN_ERROR;
diff --git a/store/src/main/java/org/apache/rocketmq/store/index/IndexFile.java b/store/src/main/java/org/apache/rocketmq/store/index/IndexFile.java
index 2850598..3d76b73 100644
--- a/store/src/main/java/org/apache/rocketmq/store/index/IndexFile.java
+++ b/store/src/main/java/org/apache/rocketmq/store/index/IndexFile.java
@@ -77,7 +77,7 @@ public class IndexFile {
             this.indexHeader.updateByteBuffer();
             this.mappedByteBuffer.force();
             this.mappedFile.release();
-            log.info("flush index file eclipse time(ms) " + (System.currentTimeMillis() -
beginTime));
+            log.info("flush index file elapsed time(ms) " + (System.currentTimeMillis() -
beginTime));
         }
     }
 


Mime
View raw message