erigontech / erigontech/erigon

dl: mutex and stats follow-up

Open
#16,897 1 comment 0 reactions 0 assignees View on GitHub
Networking
Dominant language
Go
Stars
3.6k
Forks
1.5k
Avg merge
1d 16h
Merged PRs (30d)
455

Description

follow-up after: https://github.com/erigontech/erigon/pull/16895/files

- unclear which fields it covering - group such fields to 1 structure with mutex
- add explicit `Clone` method to `Stats` class. Because it has pointers and we do copy by `prevStats := dl.stats`
- avoid atomics use in `Stats` class or make all fields atomic
- re-check perf of `Downloader.newStats` method

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.