﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	launchpad_bug
2105	fix the definition of needs-rebalancing	daira	daira	"Split from #1784 (also see [ticket:1115#comment:27]):

The value of {{{needs-rebalancing}}} is computed inconsistently between {{{checker.py}}} and {{{filenode.py}}}. In {{{checker.py}}} it is computed as:
{{{
# The file needs rebalancing if the set of servers that have at least
# one share is less than the number of uniquely-numbered shares
# available.
# TODO: this may be wrong, see ticket #1115 comment:27 and ticket #1784.
needs_rebalancing = bool(good_share_hosts < len(verifiedshares))
}}}
In {{{filenode.py}}} it is computed as
{{{
# TODO: this may be wrong, see ticket #1115 comment:27 and ticket #1784.
needs_rebalancing = bool(len(sm) >= verifycap.total_shares)
}}}
where {{{len(sm)}}} is equal to {{{count-shares-good}}}. I don't understand this latter definition at all, it looks completely wrong. The definition in {{{checker.py}}} is more subtly wrong because it credits servers that only have duplicated shares as contributing to existing balance. The correct definition should be something like 'iff the happiness count is less than the number of uniquely-numbered good shares available'.

I propose to change {{{filenode.py}}} and {{{checker.py}}} to be consistent, and to both use the happiness-based definition above.
"	defect	closed	normal	1.10.1	code-frontend-web	1.9.1	fixed	check verify repair servers-of-happiness blocks-release test-needed		
