This repository has been archived by the owner on Jan 21, 2022. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 344
Is calling “DoesTorrentExist” twice on a torrent necessary? #274
Comments
issuefiler
changed the title
Double-sink due to race condition
Double-sinking identical torrents (race condition)
May 10, 2021
Most of incoming info-hashes don’t actually make it to
|
issuefiler
changed the title
Double-sinking identical torrents (race condition)
Is calling “DoesTorrentExist” twice on a torrent necessary?
May 10, 2021
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
magnetico/cmd/magneticod/main.go
Lines 110 to 118 in 9c2183b
What’s the point of having the
DoesTorrentExist
call there when it allows multiple torrents to beSink
ed before theAddNewTorrent
call? With that, I still need to callDoesTorrentExist
again inAddNewTorrent
, otherwise it’ll eventually crash on identical torrents that have been double-Sink
ed.You’re aware of this
magnetico/pkg/persistence/sqlite3.go
Lines 122 to 157 in 9c2183b
Sink
ing of the same torrent with theDoesTorrentExist
call at theAddNewTorrent
removed, or letAddNewTorrent
solely do theDoesTorrentExist
check.DoesTorrentExist
calls are expensive, taking about 50 milliseconds.The text was updated successfully, but these errors were encountered: