Changes between Version 1 and Version 2 of Ticket #1130, comment 12
- Timestamp:
- 2012-09-29T20:47:46Z (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #1130, comment 12
v1 v2 3 3 This is how I think the repairer should work: 4 4 5 *let k and N be the shares-needed and total number of shares for this file, and let H be the happiness threshold read from {{{tahoe.cfg}}}.6 *construct a server map for this file by asking all connected servers which shares they have. (In the case of a mutable file, construct a server map for the latest retrievable version.)7 *construct a maximum matching M : server -> share, of size |M|, for this file (preferring to include servers that are earlier on the permuted list when there is a choice).8 *while |M| < N, and we have not tried to put shares on all connected servers:5 1. let k and N be the shares-needed and total number of shares for this file, and let H be the happiness threshold read from {{{tahoe.cfg}}}. 6 2. construct a server map for this file by asking all connected servers which shares they have. (In the case of a mutable file, construct a server map for the latest retrievable version.) 7 3. construct a maximum matching M : server -> share, of size |M|, for this file (preferring to include servers that are earlier on the permuted list when there is a choice). 8 4. while |M| < N, and we have not tried to put shares on all connected servers: 9 9 * pick a share not in M, and the server not in M that is next on the permuted list, wrapping around if necessary. Try to extend M by putting that share onto that server. 10 *place any remaining shares on servers that are already in the map (don't count these in |M|).11 *if the file is not retrievable, report that the repair failed completely. If k <= |M| < H, report that the file is retrievable but unhealthy. In any case report what |M| is.10 5. place any remaining shares on servers that are already in the map (don't count these in |M|). 11 6. if the file is not retrievable, report that the repair failed completely. If k <= |M| < H, report that the file is retrievable but unhealthy. In any case report what |M| is. 12 12 13 13 The while loop should be done in parallel, with up to N - |M| outstanding requests. 14 14 15 15 Upload would work in the same way (for the general case where there may be existing shares), except that it would fail if it is not possible to achieve |M| >= H. 16 17 [edit: numbered the steps]