Commit b0bf307
committed
Merge #1511: Disable torrent stats importation at start
cb487f3 fix: [#1510] disable torrent stats importation at start (Jose Celano)
Pull request description:
When the tracker starts, if stats persistence is enabled, all torrents that have ever been downloaded are loaded into memory (`Swarms` type) with their download counter.
That's the current way to count all downloads and expose that metric.
However, it does not work with **millions of torrents** (like in the tracker demo) becuase:
- It's too slow.
- It consumes too much memory (all torrents that have ever been downloaded have to be loaded).
A new solution is needed to keep that metric, but in the meantime, this disables that feature, producing these effects:
- Non-accurate value for downloads when the tracker is restarted.
- Increasing indefinitely the number of torrents in memory even if the "remove peerless torrents" policy is enabled (becuase this feature overrides that policy and peerless torrents are kept in memory).
ACKs for top commit:
josecelano:
ACK cb487f3
Tree-SHA512: 476f7fe0c1633413e4fe40458d2ebd40617471f847b9268ce902988394c422fe2c155a86071f65cb8d86d82dfbbbab68d00c54f704759f3e4a51cac57a3e9ca51 file changed
+7
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
64 | | - | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
65 | 70 | | |
66 | 71 | | |
67 | 72 | | |
| |||
110 | 115 | | |
111 | 116 | | |
112 | 117 | | |
| 118 | + | |
113 | 119 | | |
114 | 120 | | |
115 | 121 | | |
| |||
0 commit comments