server, we'll do the upload anyways. If we cannot place at least this many
in this way, the upload is declared a failure.
-The current defaults use k=3, shares_of_happiness=7, and N=10, meaning that
+The current defaults use k=3, servers_of_happiness=7, and N=10, meaning that
we'll try to place 10 shares, we'll be happy if we can place shares on enough
servers that there are 7 different servers, the correct functioning of any 3 of
which guarantee the availability of the file, and we need to get back any 3 to
pass
else:
# No more peers, so this upload might fail (it depends upon
- # whether we've hit shares_of_happiness or not). Log the last
+ # whether we've hit servers_of_happiness or not). Log the last
# failure we got: if a coding error causes all peers to fail
# in the same way, this allows the common failure to be seen
# by the uploader and should help with debugging
class NotEnoughSharesError(Exception):
"""Download was unable to get enough shares, or upload was unable to
- place 'shares_of_happiness' shares."""
+ place 'servers_of_happiness' shares."""
class NoSharesError(Exception):
"""Upload or Download was unable to get any shares at all."""
pushed.
'share_counts': return a tuple describing how many shares are used:
- (needed_shares, shares_of_happiness, total_shares)
+ (needed_shares, servers_of_happiness, total_shares)
'num_segments': return an int with the number of segments that
will be encoded.
def test_lost_one_shareholder(self):
# we have enough shareholders when we start, but one segment in we
# lose one of them. The upload should still succeed, as long as we
- # still have 'shares_of_happiness' peers left.
+ # still have 'servers_of_happiness' peers left.
modemap = dict([(i, "good") for i in range(9)] +
[(i, "lost") for i in range(9, 10)])
return self.send_and_recover((4,8,10), bucket_modes=modemap)
def test_lost_one_shareholder_early(self):
# we have enough shareholders when we choose peers, but just before
# we send the 'start' message, we lose one of them. The upload should
- # still succeed, as long as we still have 'shares_of_happiness' peers
+ # still succeed, as long as we still have 'servers_of_happiness' peers
# left.
modemap = dict([(i, "good") for i in range(9)] +
[(i, "lost-early") for i in range(9, 10)])