ChainSafe / ChainSafe/gossamer
Remove all usage of `sync.Map`
Open
Epic
- Dominant language
- Go
- Stars
- 454
- Forks
- 144
- PR merge metrics
- No merged PRs in 30d
Description
`sync.Map` proved troublesome since it would not be clearing deleted tries.
It was rather hard to debunk when doing #1973 even with various profiling.
This may not bring an advantage memory usage-wise, but could also be one / the main cause of our memory problems.
Anyway, it would be good to remove this doubt.
We should remove all usages of it (except when heavily read and no deletion) and use a mutex protected standard map instead.
Contributor guide
Assessment
This issue has not been assessed yet.