#608 closed defect (fixed)

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

Reported by: zooko Owned by:
Priority: major Milestone: 1.7.0
Component: code-encoding Version: 1.2.0
Keywords: upload availability test Cc: kevan
Launchpad Bug:

Description

There is logic in 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.

Change History (7)

comment:1 Changed at 2009-02-08T01:08:30Z by zooko

  • Milestone 1.3.0 deleted

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

comment:2 Changed at 2009-02-09T18:24:23Z by zooko

  • Cc tahoe-dev@… added

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.

comment:3 Changed at 2009-03-08T22:04:31Z by warner

  • Component changed from unknown to code-encoding
  • Owner nobody deleted

comment:4 Changed at 2009-11-16T06:00:52Z by zooko

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

comment:5 Changed at 2010-03-25T02:10:54Z by davidsarah

  • Cc tahoe-dev@… removed
  • Keywords upload availability test added
  • Milestone set to 1.7.0

comment:6 Changed at 2010-03-25T02:14:36Z by davidsarah

Related to #610 and #873.

comment:7 Changed at 2010-05-16T05:20:26Z by zooko

  • Cc kevan added
  • Resolution set to fixed
  • Status changed from new to closed

#778 did indeed fix this ticket.

Note: See TracTickets for help on using tickets.