Skip to content

Conversation

@josecelano
Copy link
Member

@josecelano josecelano commented Aug 8, 2024

Fix bug: the tracker should always remove inactive peers even when the config option core.tracker_policy.remove_peerless_torrents is disabled.

Refactor: rename the is_good function to meets_retaining_policy to be more specific.

even when `remove_peerless_torrents` is disabled.

We should remove peer that haven't announce otherwise we are returning
inactive peers to the clients. That does not affect keeping the torrents
even if they don't have any peer.
A "good" torrent means it should be retained in the repository according
to the tracker policy. It should not be removed (even if it does not
have any peers).
@josecelano josecelano self-assigned this Aug 8, 2024
@josecelano josecelano requested a review from da2ce7 August 8, 2024 15:40
@josecelano josecelano added the Bug Incorrect Behavior label Aug 8, 2024
@josecelano josecelano added this to the v3.0.0 milestone Aug 8, 2024
@josecelano josecelano linked an issue Aug 8, 2024 that may be closed by this pull request
@josecelano
Copy link
Member Author

ACK 3fbab31

@josecelano josecelano changed the title Fix bug: the tracker should we always remove inactive peers Fix bug: the tracker should always remove inactive peers Aug 8, 2024
@codecov
Copy link

codecov bot commented Aug 8, 2024

Codecov Report

Attention: Patch coverage is 87.50000% with 2 lines in your changes missing coverage. Please review.

Project coverage is 77.10%. Comparing base (bd5f4e8) to head (3fbab31).

Files Patch % Lines
src/core/mod.rs 0.00% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #1003   +/-   ##
========================================
  Coverage    77.10%   77.10%           
========================================
  Files          185      185           
  Lines        10063    10063           
========================================
  Hits          7759     7759           
  Misses        2304     2304           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@josecelano josecelano merged commit eaa86a7 into torrust:develop Aug 8, 2024
@josecelano josecelano deleted the 1002-bug-should-we-always-remove-inactive-peers branch August 8, 2024 16:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Incorrect Behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug? should we always remove inactive peers?

1 participant