Opened 11 years ago

Closed 11 years ago

#3595 closed Enhancement (fixed)

Allow promotion of the "from" value in peer_atom (and still show where it was first discovered)

Reported by: Longinus00 Owned by: livings124
Priority: Normal Milestone: 2.20
Component: libtransmission Version: 2.10
Severity: Normal Keywords:
Cc:

Description

Transmission uses the "from" value in peer_atom when determining atoms it wants to keep or connect to. Currently the "from" value is set in stone when transmission first learns of a peer even if it finds it through "better" sources later.

Attachments (1)

peerFromField.patch (11.7 KB) - added by Longinus00 11 years ago.

Download all attachments as: .zip

Change History (11)

Changed 11 years ago by Longinus00

comment:1 Changed 11 years ago by charles

Longinus00, I don't think this patch does any harm, but I'm not sure that I see the benefit either. What does this win compared to promoting an atom's "from" field from a worse state to a higher one?

comment:2 Changed 11 years ago by livings124

It would put all peers into a fair state when picking the best based on where it's from. Since you're using the criteria of where it's from, best to use the best (or worst) place it was discovered, instead of which happened to be the first.

comment:3 Changed 11 years ago by charles

livings124, wouldn't promotion do the same thing?

comment:4 Changed 11 years ago by livings124

Assuming none of the code uses the information, then ya, it would be the same. Is multiple "froms" something we should show in the GUI?

comment:5 Changed 11 years ago by Longinus00

My reasoning for not simply replacing the 'from' value was two fold:

  1. give a slight preference to peers which are more 'visible'
  2. keep better records of where peers are from

The reason I made my patch compatible with the old "from" is because it's used in the mac client. The only other place I saw it being used was in transmission-remote-cli but that project doesn't provide much backward compatibility so changing things up there probably isn't an issue.

comment:6 Changed 11 years ago by livings124

The Mac client can always be changed if needed.

comment:7 Changed 11 years ago by charles

Longinus00, if you're happy with this patch go ahead & commit

comment:8 Changed 11 years ago by livings124

  • Summary changed from change "from" in peer_atom to a bitfield to Allow promotion of the "from" value in peer_atom

comment:9 Changed 11 years ago by livings124

  • Milestone changed from None Set to 2.20
  • Owner changed from Longinus00 to livings124
  • Summary changed from Allow promotion of the "from" value in peer_atom to Allow promotion of the "from" value in peer_atom (and still show where it was first discovered)

comment:10 Changed 11 years ago by livings124

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.