未验证 提交 765cac3d 编写于 作者: H Heng Du 提交者: GitHub

Merge pull request #3025 from Git-Yang/statistics_bug

[ISSUE #3023] Fix the inconsistency of putMessageDistributeTime statistics
......@@ -57,6 +57,7 @@ public class StoreStatsService extends ServiceThread {
private final LinkedList<CallSnapshot> getTimesMissList = new LinkedList<CallSnapshot>();
private final LinkedList<CallSnapshot> transferedMsgCountList = new LinkedList<CallSnapshot>();
private volatile AtomicLong[] putMessageDistributeTime;
private volatile AtomicLong[] lastPutMessageDistributeTime;
private long messageStoreBootTimestamp = System.currentTimeMillis();
private volatile long putMessageEntireTimeMax = 0;
private volatile long getMessageEntireTimeMax = 0;
......@@ -80,11 +81,11 @@ public class StoreStatsService extends ServiceThread {
next[i] = new AtomicLong(0);
}
AtomicLong[] old = this.putMessageDistributeTime;
this.lastPutMessageDistributeTime = this.putMessageDistributeTime;
this.putMessageDistributeTime = next;
return old;
return lastPutMessageDistributeTime;
}
public long getPutMessageEntireTimeMax() {
......@@ -298,7 +299,7 @@ public class StoreStatsService extends ServiceThread {
}
private String putMessageDistributeTimeToString() {
final AtomicLong[] times = this.putMessageDistributeTime;
final AtomicLong[] times = this.lastPutMessageDistributeTime;
if (null == times)
return null;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册