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:
Paul Saab
2014-09-24 09:53:35 -07:00
parent b910fdabf5
commit ad9034da6d
3 changed files with 101 additions and 51 deletions
+1 -1
View File
@@ -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(