Closed saketh-are closed 1 month ago
Attention: Patch coverage is 90.62500%
with 9 lines
in your changes missing coverage. Please review.
Project coverage is 71.53%. Comparing base (
773aae7
) to head (642e9d7
). Report is 4 commits behind head on master.
Files with missing lines | Patch % | Lines |
---|---|---|
chain/network/src/snapshot_hosts/mod.rs | 89.41% | 8 Missing and 1 partial :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
This module is dead code in master but I've started using it in #12095. While testing end-to-end I noticed some unexpected behavior and started digging into the implementation. While doing so I ended up refactoring it extensively and simplifying it somewhat. Ultimately I don't think there was actually any bug.
One meaningful change I've made is to include the shard id in the priority score. This ensures that in the specific situation that different shards have the same/similar host set and the number of parts is smaller than the number of hosts, the load will still be well distributed. This is admittedly not a concern in mainnet (where the number of parts should be large) but can easily occur in localnet.