[tahoe-lafs-trac-stream] [tahoe-lafs] #2105: fix the definition of needs-rebalancing
tahoe-lafs
trac at tahoe-lafs.org
Thu Nov 14 17:41:38 UTC 2013
#2105: fix the definition of needs-rebalancing
-------------------------------------------------+-------------------------
Reporter: daira | Owner: daira
Type: defect | Status: new
Priority: normal | Milestone:
Component: unknown | undecided
Keywords: check verify repair servers-of- | Version: 1.10.0
happiness | Launchpad Bug:
-------------------------------------------------+-------------------------
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.
--
Ticket URL: <https://tahoe-lafs.org/trac/tahoe-lafs/ticket/2105>
tahoe-lafs <https://tahoe-lafs.org>
secure decentralized storage
More information about the tahoe-lafs-trac-stream
mailing list