Torrent availability count is wrong

Bug #587337 reported by Łukasz Chełmicki
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
qBittorrent
Fix Released
Low
Christophe Dumez

Bug Description

When there is a missing peace, availability should be less then 1. My English is pure to explain it, so I'll give an example:

ex1.
there are 3 peers all of them have 70% of a torrent, all of them have the same peaces. availability should be 0.7 and you have 2.1.

ex2.
there are 3 peers all of them have 70% of a torrent, all of them have different peaces then the availability should be counted like this
peer | peaces spread
1 | 70% - 30%
2 | 15%- 70% 15%
3 | 30% - 70%

you take all 70% from the first one and last 30% of peaces from the 3rd peer = 1
now there's left middle 70% from the 2nd peer and middle 40% from the third one = 0.7

So the availability is 1.7 and not 2.1
I hope my pure English was enough to explain the bug I encountered.

Tags: availability
description: updated
Revision history for this message
Christophe Dumez (hydr0g3n) wrote :

I display the availability computed by libtorrent as far as I know. It may compute the availability differently from you.

Do you know how uTorrent computes its availability? It is very likely that libtorrent follows uTorrent's "standard".

Revision history for this message
Christophe Dumez (hydr0g3n) wrote :

I checked the availability computation, I compute an average on the availability returned by libtorrent for each piece.

Revision history for this message
Christophe Dumez (hydr0g3n) wrote :

Ok, here is uTorrent definition:

#
What does availability mean?

That number tells you how many unique copies of the file are available between yourself and the peers you're connected to. If this is less than 1, you most likely will not be able to complete the torrent. The only thing you can do is wait and hope a seeder hops onto the torrent to allow you to complete it. You can also try and request a "reseed" on the tracker's forum. Sometimes, this may never happen because the torrent was abandoned, and you may need to find the torrent elsewhere.
#

It seems you are right, I will fix this for v2.2.9

Changed in qbittorrent:
assignee: nobody → Christophe Dumez (hydr0g3n)
importance: Undecided → Low
milestone: none → 2.2.9
status: New → In Progress
Revision history for this message
Christophe Dumez (hydr0g3n) wrote :

This is fixed in SVN. Thanks!

Changed in qbittorrent:
status: In Progress → Fix Committed
summary: - Availability is counting wrang.
+ Torrent availability count is wrong
Revision history for this message
Łukasz Chełmicki (lukasz-chelmicki) wrote :

thanx for fast reply and fast reaction on fixing it. I'll try to build my qBitTorrent from SVN.

Changed in qbittorrent:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.