ChainSafe / ChainSafe/gossamer

Remove all usage of `sync.Map`

Open
#2,281 0 comments 0 reactions 0 assignees View on GitHub
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

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.