Changeset 1819e080 in trunk


Ignore:
Timestamp:
2021-09-02T20:21:20Z (4 years ago)
Author:
GitHub <noreply@…>
Branches:
master
Children:
51b1e56, 8d15a0d5, a5d764d, f0fe323
Parents:
056ee58 (diff), ae9ec48 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
git-author:
Jean-Paul Calderone <exarkun@…> (2021-09-02 20:21:20)
git-committer:
GitHub <noreply@…> (2021-09-02 20:21:20)
Message:

Merge pull request #1116 from LeastAuthority?/3769.gbs-immutable-upload-spec-improvements

Some GBS immutable upload spec improvements

Fixes: ticket:3769

Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified docs/proposed/http-storage-node-protocol.rst

    r056ee58 r1819e080  
    459459The share number must belong to the storage index.
    460460The request body is the raw share data (i.e., ``application/octet-stream``).
    461 *Content-Range* requests are encouraged for large transfers.
     461*Content-Range* requests are encouraged for large transfers to allow partially complete uploads to be resumed.
    462462For example,
    463 for a 1MiB share the data can be broken in to 8 128KiB chunks.
    464 Each chunk can be *PUT* separately with the appropriate *Content-Range* header.
     463a 1MiB share can be divided in to eight separate 128KiB chunks.
     464Each chunk can be uploaded in a separate request.
     465Each request can include a *Content-Range* value indicating its placement within the complete share.
     466If any one of these requests fails then at most 128KiB of upload work needs to be retried.
     467
    465468The server must recognize when all of the data has been received and mark the share as complete
    466469(which it can do because it was informed of the size when the storage index was initialized).
    467470Clients should upload chunks in re-assembly order.
    468 Servers may reject out-of-order chunks for implementation simplicity.
    469 If an individual *PUT* fails then only a limited amount of effort is wasted on the necessary retry.
    470 
    471 .. think about copying https://developers.google.com/drive/api/v2/resumable-upload
     471
     472* When a chunk that does not complete the share is successfully uploaded the response is ``OK``.
     473* When the chunk that completes the share is successfully uploaded the response is ``CREATED``.
     474* If the *Content-Range* for a request covers part of the share that has already been uploaded the response is ``CONFLICT``.
     475  The response body indicates the range of share data that has yet to be uploaded.
     476  That is::
     477
     478    { "required":
     479      [ { "begin": <byte position, inclusive>
     480        , "end":   <byte position, exclusive>
     481        }
     482      ,
     483      ...
     484      ]
     485    }
     486
    472487
    473488``POST /v1/immutable/:storage_index/:share_number/corrupt``
Note: See TracChangeset for help on using the changeset viewer.