You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bookkeeper.apache.org by si...@apache.org on 2020/03/18 23:05:14 UTC
[bookkeeper] branch master updated: fix some stats monitor metrics
This is an automated email from the ASF dual-hosted git repository.
sijie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/bookkeeper.git
The following commit(s) were added to refs/heads/master by this push:
new fbfd49a fix some stats monitor metrics
fbfd49a is described below
commit fbfd49a1e0307e5d490a2cdf8cbb840ef88cf628
Author: hangc0276 <ha...@163.com>
AuthorDate: Thu Mar 19 07:05:04 2020 +0800
fix some stats monitor metrics
Descriptions of the changes in this PR:
The journalStats.getJournalQueueSize increase once and decrease twice, so this stat metric will be negative.
It increases in `logAddEntry` function and decrease in `QueueEntry recall` methord and Journal main thread run methord.
so we should delete the decrease in journal main thread run methord.
```
queue.put(QueueEntry.create(
entry, ackBeforeSync, ledgerId, entryId, cb, ctx, MathUtils.nowInNano(),
journalStats.getJournalAddEntryStats(),
journalStats.getJournalQueueSize()))
```
Reviewers: Sijie Guo <None>
This closes #2290 from hangc0276/bugfix_metrics
---
.../src/main/java/org/apache/bookkeeper/bookie/Journal.java | 1 -
.../apache/bookkeeper/bookie/storage/ldb/DbLedgerStorageStats.java | 4 ++--
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/Journal.java b/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/Journal.java
index 090c356..5d09e2f 100644
--- a/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/Journal.java
+++ b/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/Journal.java
@@ -1090,7 +1090,6 @@ public class Journal extends BookieCriticalThread implements CheckpointSource {
} else if (qe.entryId != Bookie.METAENTRY_ID_FORCE_LEDGER) {
int entrySize = qe.entry.readableBytes();
journalStats.getJournalWriteBytes().add(entrySize);
- journalStats.getJournalQueueSize().dec();
batchSize += (4 + entrySize);
diff --git a/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/storage/ldb/DbLedgerStorageStats.java b/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/storage/ldb/DbLedgerStorageStats.java
index bc99c60..9088dda 100644
--- a/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/storage/ldb/DbLedgerStorageStats.java
+++ b/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/storage/ldb/DbLedgerStorageStats.java
@@ -87,12 +87,12 @@ class DbLedgerStorageStats {
)
private final OpStatsLogger readAheadBatchCountStats;
@StatsDoc(
- name = READAHEAD_BATCH_COUNT,
+ name = READAHEAD_BATCH_SIZE,
help = "the distribution of num of bytes to read in one readahead batch"
)
private final OpStatsLogger readAheadBatchSizeStats;
@StatsDoc(
- name = FLUSH_SIZE,
+ name = FLUSH,
help = "operation stats of flushing write cache to entry log files"
)
private final OpStatsLogger flushStats;