• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

iotaledger / iota / 28141212998
67%

Build:
DEFAULT BRANCH: develop
Ran 25 Jun 2026 02:37AM UTC
Jobs 1
Files 1108
Run time 2min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

24 Jun 2026 12:50PM UTC coverage: 67.488% (+0.02%) from 67.464%
28141212998

push

github

web-flow
fix(typed-store): make lazy DBMetrics init race-safe (#11998)

# Description of change

`test_consensus_handler*` and
`test_consensus_commit_prologue_generation` failed intermittently under
parallel (in-process) execution and passed single-threaded. The root
cause is a process-global Prometheus double-registration race in
`DBMetrics`: `DBMetrics::get()` lazily initialized the global metrics
via a non-atomic `OnceCell::get().unwrap_or_else(||
DBMetrics::init(default_registry()))`. When two tests in the same
process build RocksDB-backed `DBMap`s before the cell is set, both run
the fallback, both register the same rocksdb metric names into the
global default registry, and the loser panics with `Result::unwrap()` on
`Err(AlreadyReg)` in `crates/typed-store/src/metrics.rs`.

The fix makes only the lazy `get()` path atomic by switching to
`OnceCell::get_or_init`, so the build-and-register closure runs at most
once across threads. `init(registry)` is left unchanged, so explicit
callers still register into whatever registry they pass. There is no
metrics behavior change otherwise: `get()` still registers into the
default registry on first use and returns the cached instance thereafter
— concurrent first-time initialization simply can no longer
double-register.

This is an in-process (`cargo test` / libtest) hazard. Under nextest
(process-per-test) each test runs in its own process and is isolated, so
CI was unaffected, which is why the flake only reproduced locally.

## Links to any relevant issues

fixes #11705

## How the change has been tested

- [x] Basic tests (linting, compilation, formatting, unit/integration
tests)
- [x] Patch-specific tests (correctness, functionality coverage)
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [x] I have checked that new and existing unit tests pass locally with
my changes

Reproduced the panic reliably (failed on the first run) by running the
two `test_consensus_handler*` tests in a... (continued)

1 of 1 new or added line in 1 file covered. (100.0%)

1638 existing lines in 63 files now uncovered.

158590 of 234990 relevant lines covered (67.49%)

475096.44 hits per line

Coverage Regressions

Lines Coverage ∆ File
248
82.33
-0.01% crates/iota-core/src/authority.rs
122
84.35
0.61% crates/starfish/core/src/commit.rs
112
83.88
0.13% crates/iota-transactional-test-runner/src/test_adapter.rs
95
81.63
0.54% crates/starfish/core/src/network/tonic_network.rs
89
83.1
-0.05% crates/iota-types/src/transaction.rs
82
77.05
0.07% crates/starfish/core/src/commit_syncer/mod.rs
77
93.02
0.21% crates/starfish/core/src/block_header.rs
73
77.33
-0.28% crates/iota-core/src/checkpoints/mod.rs
70
38.87
0.0% crates/iota/src/keytool.rs
70
51.93
0.3% crates/iota-types/src/iota_sdk_types_conversions.rs
46
88.29
-0.07% crates/iota-types/src/messages_checkpoint.rs
39
71.43
-16.16% crates/iota-types/src/move_authenticator.rs
37
88.97
0.12% crates/starfish/core/src/commit_syncer/fast.rs
32
74.17
-1.08% crates/iota-network/src/randomness/mod.rs
32
87.4
0.02% crates/starfish/core/src/commit_syncer/regular.rs
31
0.0
0.0% crates/iota-snapshot/src/uploader.rs
30
0.0
0.0% crates/iota-graphql-rpc/src/types/epoch.rs
28
79.5
-0.36% crates/iota-types/src/crypto.rs
24
89.16
-0.96% crates/iota-types/src/base_types.rs
23
25.62
1.48% crates/iota-json-rpc-types/src/iota_checkpoint.rs
22
97.88
0.19% crates/starfish/core/src/commit_observer.rs
21
5.24
0.0% crates/iota-tool/src/lib.rs
17
59.26
0.38% crates/iota/src/signing.rs
15
89.35
-4.81% crates/iota-core/src/connection_monitor.rs
14
77.96
-1.93% crates/iota-core/src/traffic_controller/mod.rs
11
82.86
0.0% crates/starfish/core/src/error.rs
10
67.72
-0.48% crates/iota-core/src/authority/authority_store.rs
10
75.55
-2.55% crates/iota-sdk/src/wallet_context.rs
10
44.16
-12.99% crates/iota-types/src/messages_grpc.rs
10
94.22
0.1% crates/starfish/config/src/parameters.rs
9
56.5
-0.14% crates/iota-json-rpc-types/src/iota_object.rs
9
89.65
-0.94% crates/iota-network/src/state_sync/mod.rs
8
89.57
0.54% crates/iota-test-transaction-builder/src/lib.rs
8
93.51
-0.55% crates/starfish/core/src/transactions_synchronizer.rs
8
75.34
0.49% crates/test-cluster/src/lib.rs
7
91.6
-0.28% crates/starfish/core/src/header_synchronizer.rs
6
84.33
0.0% crates/iota-core/src/post_consensus_validation.rs
6
46.9
-5.31% crates/iota-genesis-builder/src/stardust/types/snapshot.rs
6
91.85
-4.44% crates/iota-package-management/src/lib.rs
6
99.44
0.01% iota-execution/latest/iota-move-natives/src/lib.rs
5
55.77
-9.62% crates/iota-json-rpc-types/src/iota_coin.rs
5
85.64
0.99% crates/iota-transaction-builder/src/lib.rs
5
98.1
-1.58% crates/transaction-fuzzer/src/account_universe/transfer_gen.rs
4
90.17
-1.36% crates/iota-core/src/authority/test_authority_builder.rs
4
88.28
-0.09% crates/iota-genesis-builder/src/lib.rs
4
54.23
4.31% crates/iota-replay/src/replay.rs
4
0.0
-80.0% crates/iota-types/src/messages_safe_client.rs
4
86.76
-5.88% crates/iota-types/src/quorum_driver_types.rs
3
81.75
-0.75% crates/iota-config/src/genesis.rs
3
91.24
-0.13% crates/iota-core/src/execution_cache/writeback_cache.rs
3
60.75
0.57% crates/iota-json-rpc-types/src/iota_transaction.rs
3
0.0
-7.69% crates/iota-replay/src/types.rs
3
78.87
-0.57% iota-execution/latest/iota-move-natives/src/object_runtime/object_store.rs
2
91.06
-0.08% crates/iota-core/src/authority/authority_per_epoch_store.rs
2
92.67
-0.24% crates/iota-core/src/consensus_adapter.rs
2
78.69
-3.28% crates/iota-core/src/traffic_controller/nodefw_test_server.rs
2
40.72
0.36% crates/iota-types/src/signature.rs
2
97.18
0.69% crates/starfish/core/src/commit_consumer.rs
1
86.11
-2.78% crates/iota-cluster-test/src/test_case/native_transfer_test.rs
1
73.11
-0.18% crates/iota-core/src/authority_server/validator.rs
1
48.38
-0.32% crates/iota-replay/src/data_fetcher.rs
1
97.3
-0.1% crates/starfish/core/src/cordial_knowledge.rs
1
96.34
-0.03% crates/starfish/core/src/dag_state.rs
Jobs
ID Job ID Ran Files Coverage
1 nextest+simtest - 28141212998.1 25 Jun 2026 02:37AM UTC 1108
67.49
GitHub Action Run
Source Files on build 28141212998
  • Tree
  • List 1108
  • Changed 124
  • Source Changed 79
  • Coverage Changed 83
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #28141212998
  • 4a46887e on github
  • Prev Build on develop (#28069178327)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc