-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
don't attempt sending event=stopped if event=start never succeeded #4236
Conversation
Codecov Report
@@ Coverage Diff @@
## RC_1_2 #4236 +/- ##
==========================================
+ Coverage 74.51% 74.69% +0.18%
==========================================
Files 439 439
Lines 60617 60618 +1
Branches 8959 8959
==========================================
+ Hits 45170 45281 +111
+ Misses 10927 10817 -110
Partials 4520 4520
Continue to review full report at Codecov.
|
if there are no objection to this, I will add a test and land it |
The |
that's a good point, and it highlights a potential existing issue. For the tracker to support peers changing IP, we have the (The each How can the tracker tell the difference between a peer being reachable via multiple IP addresses from a peer that changed IP between two announces? Currently, since we use the same key, it would be reasonable for a tracker to overwrite the first announce with the second one. |
@X-Coder264 Do you have any ideas about the above? I get the impression you don't look at the |
@arvidn I haven't yet seen a tracker that implements the If the peer announces from an IP that didn't exist before in the database we insert it. For the case where the peer IP address was changed and now after inserting the new IP address we have both the correct and the now incorrect IP in the database there is always a cron that goes through all peers that haven't announced in the expected time (plus some buffer time). For example if the announce cycle is every 40 minutes then we delete all peer IP addresses from which we haven't received an announce request in the last 50 minutes. This is how trackers implement this, which I admit is not really ideal, but it works well enough. I'll look into the |
so, it sounds like from your point of view, if a peer changes IP address, you would expect it to send another I imagine private trackers would care about the stopped announce, to get the last window of stats. It's not obvious what the right behavior is. When changing IP address you want the key to be stable, so a tracker that wants to can know it's the same peer still. When a client has multiple IP addresses, the key should probably not be the same for the different addresses. If one of the addresses change, the key should probably stay the same, and the "sent_start" state should probably be preserved. |
My impression now is that nobody (as in no tracker) supports updating the IP address of a peer based on it announcing from a new source IP with the same So, the use for This means that, today, if a peer announces It also has the consequence that if the client announces I don't think this behavior is entirely outrageous, but it would probably be a good idea to trigger announces early if the source IP changes. At least when it's known to the client, which is the case I describe above. |
If the peer changes the IP address announcing with
IMO, that is fine. The new/changed IP will be inserted into the DB (be it with
Yeah, well, we are going to get the announce data in the announce with the new IP so it should be fine. |
60f9173
to
6506a35
Compare
I think this is worth going for. at some point it probably makes sense to trigger re-announces whenever the listen sockets change too |
No description provided.