-
Notifications
You must be signed in to change notification settings - Fork 668
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(metrics): pass the epoch manager to spawn_trie_metrics_loop (#12811)
This function creates its own epoch manager with new_from_genesis_config(), but this is not how the main epoch manager is created at startup, which is done with new_arc_handle(). These result in epoch managers that return different EpochConfigs for a given protocol version, since only the second one initializes an epoch config store from the genesis config, and the first one generates epoch configs with generate_epoch_config(). In this case it leads to a crash if the shard layouts are different because the call to `ShardUId::from_shard_id_and_layout()` will see the wrong shard IDs and crash at `assert!(shard_layout.shard_ids().any(|i| i == shard_id));`
- Loading branch information
1 parent
5baf443
commit 8097202
Showing
2 changed files
with
15 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters