From 4832e36d6e6acbf06a7688051ba675ea8b47ebd8 Mon Sep 17 00:00:00 2001 From: jsvisa Date: Wed, 22 Mar 2023 15:38:33 +0800 Subject: [PATCH 1/4] core/rawdb: freeze's read meter not updated Signed-off-by: jsvisa --- core/rawdb/freezer_table.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/rawdb/freezer_table.go b/core/rawdb/freezer_table.go index 10dfb90ea77d..91f4f4f0b53c 100644 --- a/core/rawdb/freezer_table.go +++ b/core/rawdb/freezer_table.go @@ -823,6 +823,10 @@ func (t *freezerTable) retrieveItems(start, count, maxBytes uint64) ([]byte, []i break } } + + // Update metrics. + t.sizeGauge.Inc(int64(totalSize)) + t.readMeter.Mark(int64(totalSize)) return output[:outputSize], sizes, nil } From a4b03d918332823ea8201390444d87aa2b87420c Mon Sep 17 00:00:00 2001 From: jsvisa Date: Thu, 23 Mar 2023 10:07:23 +0800 Subject: [PATCH 2/4] core/rawdb: no need to update size gauge Signed-off-by: jsvisa --- core/rawdb/freezer_table.go | 1 - 1 file changed, 1 deletion(-) diff --git a/core/rawdb/freezer_table.go b/core/rawdb/freezer_table.go index 91f4f4f0b53c..928b37d70b2d 100644 --- a/core/rawdb/freezer_table.go +++ b/core/rawdb/freezer_table.go @@ -825,7 +825,6 @@ func (t *freezerTable) retrieveItems(start, count, maxBytes uint64) ([]byte, []i } // Update metrics. - t.sizeGauge.Inc(int64(totalSize)) t.readMeter.Mark(int64(totalSize)) return output[:outputSize], sizes, nil } From ff5f67303051738eaecef2a45fb7c7e81630fa1f Mon Sep 17 00:00:00 2001 From: jsvisa Date: Thu, 23 Mar 2023 10:08:16 +0800 Subject: [PATCH 3/4] Revert "core/rawdb: no need to update size gauge" This reverts commit a4b03d918332823ea8201390444d87aa2b87420c. Signed-off-by: jsvisa --- core/rawdb/freezer_table.go | 1 + 1 file changed, 1 insertion(+) diff --git a/core/rawdb/freezer_table.go b/core/rawdb/freezer_table.go index 928b37d70b2d..91f4f4f0b53c 100644 --- a/core/rawdb/freezer_table.go +++ b/core/rawdb/freezer_table.go @@ -825,6 +825,7 @@ func (t *freezerTable) retrieveItems(start, count, maxBytes uint64) ([]byte, []i } // Update metrics. + t.sizeGauge.Inc(int64(totalSize)) t.readMeter.Mark(int64(totalSize)) return output[:outputSize], sizes, nil } From a227425a3c182d2d573f4b38c6e98038a74c5db2 Mon Sep 17 00:00:00 2001 From: jsvisa Date: Thu, 23 Mar 2023 10:30:07 +0800 Subject: [PATCH 4/4] Revert "Revert "core/rawdb: no need to update size gauge"" This reverts commit ff5f67303051738eaecef2a45fb7c7e81630fa1f. Signed-off-by: jsvisa --- core/rawdb/freezer_table.go | 1 - 1 file changed, 1 deletion(-) diff --git a/core/rawdb/freezer_table.go b/core/rawdb/freezer_table.go index 91f4f4f0b53c..928b37d70b2d 100644 --- a/core/rawdb/freezer_table.go +++ b/core/rawdb/freezer_table.go @@ -825,7 +825,6 @@ func (t *freezerTable) retrieveItems(start, count, maxBytes uint64) ([]byte, []i } // Update metrics. - t.sizeGauge.Inc(int64(totalSize)) t.readMeter.Mark(int64(totalSize)) return output[:outputSize], sizes, nil }