Skip to content

Commit

Permalink
check if RocksDbStats are open before providing the external summary
Browse files Browse the repository at this point in the history
Signed-off-by: Gabriel Fukushima <[email protected]>
  • Loading branch information
gfukushima committed Jan 22, 2025
1 parent a90192b commit 4a1abe9
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

package tech.pegasys.teku.storage.server.rocksdb;

import java.util.Collections;
import java.util.List;
import java.util.Locale;
import java.util.function.Supplier;
Expand Down Expand Up @@ -195,7 +196,7 @@ public void registerMetrics(final RocksDB database) {
+ "_"
+ histogram.name().toLowerCase(Locale.ROOT),
"RocksDB histogram for " + histogram.name(),
() -> provideExternalSummary(stats, histogram));
() -> ifOpen(() -> provideExternalSummary(stats, histogram), new ExternalSummary(0, 0, Collections.emptyList())));
}
}
}
Expand Down

0 comments on commit 4a1abe9

Please sign in to comment.