Opened at 2011-08-27T20:44:07Z
Closed at 2011-08-27T22:51:05Z
#1510 closed defect (fixed)
modifying SDMF file fails when tahoe.cfg's k/N differs from file
Reported by: | warner | Owned by: | Brian Warner <warner@…> |
---|---|---|---|
Priority: | critical | Milestone: | 1.9.0 |
Component: | code-mutable | Version: | 1.9.0a1 |
Keywords: | Cc: | ||
Launchpad Bug: |
Description
I found a regression in the SDMF publish code when I happened to try to update an old directory that I'd created with k=3/N=20. My current tahoe.cfg uses k=3/N=10. The exception is a NotEnoughServersError that wraps an AssertionError in mutable.layout.SDMFSlotWriteProxy.finish_publishing, where it notices that it doesn't have all the share pieces it needs (it's missing sharedata, blockhashes, and sharehashes, but it has verification_key, encprivkey, and signature).
The publish process has several dictionaries that are keyed by share number. It looks like some of them are being filled with shnums that depend upon what the current tahoe.cfg has for shares.total, whereas others are filled according to which existing shares were actually found. If tahoe.cfg has changed in the meantime, finish_publishing() will be called on shnums that were never handled in the earlier methods.
I've attached a unit test which exercises this case in a pretty narrow way.
This is a blocker for 1.9
Attachments (2)
Change History (3)
Changed at 2011-08-27T20:44:38Z by warner
Changed at 2011-08-27T21:15:03Z by warner
here's the fix: update k/N after retrieval, so we use the same values on subsequent publish
comment:1 Changed at 2011-08-27T22:51:05Z by Brian Warner <warner@…>
- Owner set to Brian Warner <warner@…>
- Resolution set to fixed
- Status changed from new to closed
In 370e6f271e40945b:
unit test to exercise the failure