You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 21, 2022. It is now read-only.
What’s the point of having the DoesTorrentExist call there when it allows multiple torrents to be Sinked before the AddNewTorrent call? With that, I still need to call DoesTorrentExistagain in AddNewTorrent, otherwise it’ll eventually crash on identical torrents that have been double-Sinked.
It should either prevent the double-Sinking of the same torrent with the DoesTorrentExist call at the AddNewTorrent removed, or let AddNewTorrentsolely do the DoesTorrentExist check. DoesTorrentExist calls are expensive, taking about 50 milliseconds.
The text was updated successfully, but these errors were encountered:
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 ms.flush (NewLeech’s OnSuccess). Why bother checking duplicate info-hashes with lots of expensive database calls(The query itself is cheap, but the client overhead is not negligible.), when most of them can’t make it to AddNewTorrent and AddNewTorrent also has the dup-checking logic that is more reliable? Is it to save bandwidth?
issuefiler
changed the title
Double-sinking identical torrents (race condition)
Is calling “DoesTorrentExist” twice on a torrent necessary?
May 10, 2021
Sign up for freeto 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: