mirror of
https://github.com/sot-tech/mochi.git
synced 2026-07-29 10:38:11 -07:00
Reduce contention on the torrent map
We see the torrent map have quite a bit of contention. Shard the map by a configurable number of shards to reduce the times we may contend on the lock.
This commit is contained in:
+1
-1
@@ -35,7 +35,7 @@ func New(cfg *config.Config) (*Tracker, error) {
|
||||
tkr := &Tracker{
|
||||
Config: cfg,
|
||||
Backend: bc,
|
||||
Storage: NewStorage(),
|
||||
Storage: NewStorage(cfg),
|
||||
}
|
||||
|
||||
go tkr.purgeInactivePeers(
|
||||
|
||||
Reference in New Issue
Block a user