You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opendal.apache.org by ko...@apache.org on 2026/03/24 04:53:30 UTC
(opendal) branch main updated: fix(observability): do not account processed entries count when the list operation returns none (#7269)
This is an automated email from the ASF dual-hosted git repository.
koushiro pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/opendal.git
The following commit(s) were added to refs/heads/main by this push:
new bc6e2e4f8 fix(observability): do not account processed entries count when the list operation returns none (#7269)
bc6e2e4f8 is described below
commit bc6e2e4f889dd08268a3188e74e6c6c3b0f82b82
Author: dentiny <de...@gmail.com>
AuthorDate: Mon Mar 23 21:53:25 2026 -0700
fix(observability): do not account processed entries count when the list operation returns none (#7269)
---
core/layers/observe-metrics-common/src/lib.rs | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/core/layers/observe-metrics-common/src/lib.rs b/core/layers/observe-metrics-common/src/lib.rs
index f805ffde3..c5d536afa 100644
--- a/core/layers/observe-metrics-common/src/lib.rs
+++ b/core/layers/observe-metrics-common/src/lib.rs
@@ -987,8 +987,10 @@ impl<R: oio::List, I: MetricsIntercept> oio::List for MetricsWrapper<R, I> {
self.inner
.next()
.await
- .inspect(|_| {
- self.size += 1;
+ .inspect(|entry| {
+ if entry.is_some() {
+ self.size += 1;
+ }
})
.inspect_err(|err| {
self.interceptor.observe(