premature abort of upload if some shares were already present and some servers fail #608

Closed
opened 2009-02-07 20:16:15 +00:00 by zooko · 5 comments

There is logic in source:src/allmydata/immutable/encode.py@20090107034822-92b7f-4b8bbe1a2c1bf374154bc1cd32ff8040e998ca00#L474 to abort an upload if there aren't enough remaining shareholders. This fails to take into account that some shares might already have been present on servers before this upload began. So for example if M=10, and there were 5 shares present on servers when you started, and shares_of_happiness is 7, then you'll be talking to 5 landlords, and if one of them disconnects you should not then give up on the whole upload, per this line:

        if len(self.landlords) < self.shares_of_happiness:
            msg = "lost too many shareholders during upload: %s" % why

To test this, the test needs to create a file with 10 shares, delete 5 of them, start an upload, and then arrange it that during the upload 3 of the servers fail -- the upload should proceed normally (since share_of_happiness is 7). Also test what happens when 4 of them fail -- the upload should stop immediately.

There is logic in source:src/allmydata/immutable/encode.py@20090107034822-92b7f-4b8bbe1a2c1bf374154bc1cd32ff8040e998ca00#L474 to abort an upload if there aren't enough remaining shareholders. This fails to take into account that some shares might already have been present on servers before this upload began. So for example if M=10, and there were 5 shares present on servers when you started, and shares_of_happiness is 7, then you'll be talking to 5 landlords, and if one of them disconnects you should not then give up on the whole upload, per this line: ``` if len(self.landlords) < self.shares_of_happiness: msg = "lost too many shareholders during upload: %s" % why ``` To test this, the test needs to create a file with 10 shares, delete 5 of them, start an upload, and then arrange it that during the upload 3 of the servers fail -- the upload should proceed normally (since share_of_happiness is 7). Also test what happens when 4 of them fail -- the upload should stop immediately.
zooko added the
unknown
major
defect
1.2.0
labels 2009-02-07 20:16:15 +00:00
zooko added this to the 1.3.0 milestone 2009-02-07 20:16:15 +00:00
Author

Eh, this doesn't have to be fixed for tahoe-1.3.0.

Eh, this doesn't have to be fixed for tahoe-1.3.0.
zooko removed this from the 1.3.0 milestone 2009-02-08 01:08:30 +00:00
Author

I'm going to add cc: tahoe-dev to this ticket, and then I'm going to post the original contents of this ticket to tahoe-dev along with a link to this ticket.

I'm going to add cc: tahoe-dev to this ticket, and then I'm going to post the original contents of this ticket to tahoe-dev along with a link to this ticket.
warner added
code-encoding
and removed
unknown
labels 2009-03-08 22:04:31 +00:00
Author

Kevan's patch from ("shares of happiness" is the wrong measure; "servers of happiness" is better) might fix this.

Kevan's patch from #778 ("shares of happiness" is the wrong measure; "servers of happiness" is better) might fix this.
tahoe-lafs added this to the 1.7.0 milestone 2010-03-25 02:10:54 +00:00
davidsarah commented 2010-03-25 02:14:36 +00:00
Owner

Related to and .

Related to #610 and #873.
Author

did indeed fix this ticket.

#778 did indeed fix this ticket.
zooko added the
fixed
label 2010-05-16 05:20:26 +00:00
zooko closed this issue 2010-05-16 05:20:26 +00:00
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Reference: tahoe-lafs/trac-2024-07-25#608
No description provided.