0cfbd34da2
Design proposal for approval to support S3's UploadPartCopy. Major revision 2. Change-Id: I9cbe934a773d3496101f32afb19492ea75f48061
115 lines
2.3 KiB
Plaintext
115 lines
2.3 KiB
Plaintext
|
|
@startuml
|
|
|
|
S3Client -> Gateway: PUT /bucket/dest?uploads
|
|
|
|
Gateway -> Uplink: BeginUpload (multipart)
|
|
note left
|
|
Bucket
|
|
Key
|
|
Expires
|
|
end note
|
|
|
|
Uplink -> Satellite: BeginObjectRequest
|
|
|
|
Uplink <-- Satellite: BeginObjectResponse
|
|
note right
|
|
StreamID
|
|
end note
|
|
|
|
Gateway <-- Uplink: BeginUpload return
|
|
note right
|
|
StreamID
|
|
end note
|
|
|
|
S3Client <-- Gateway: 200 response
|
|
note right
|
|
<UploadId />
|
|
end note
|
|
|
|
group loop for every part
|
|
S3Client -> Gateway: PUT /bucket/dest?partNumber=1&uploadId=7tKsLOJgNs\nx-amz-copy-source: /bucket/source\nx-amz-copy-source-range:bytes=0-5368709120
|
|
|
|
Gateway -> Uplink: CopyObjectRange
|
|
note left
|
|
UploadID
|
|
DestinationBucket
|
|
DestinationKey
|
|
DestinationPart
|
|
SourceBucket
|
|
SourceKey
|
|
StartOffset
|
|
EndOffset
|
|
end note
|
|
|
|
Uplink -> Satellite: BeginCopyObjectRangeRequest
|
|
note left
|
|
SourceBucket
|
|
SourceKey //encrypted//
|
|
SourceOffset
|
|
Size
|
|
end note
|
|
|
|
Uplink <-- Satellite: BeginCopyObjectRangeResponse
|
|
note right
|
|
SegmentKeys //encrypted//
|
|
end note
|
|
|
|
Uplink -> Satellite: FinishCopyObjectRangeRequest
|
|
note left
|
|
DestinationStreamID
|
|
DestinationBucket
|
|
DestinationKey //encrypted//
|
|
DestinationPart
|
|
...
|
|
SegmentKeys //encrypted//
|
|
end note
|
|
note right #lightgreen
|
|
Create entries in segment table
|
|
|
|
Create 1 entry in pending_copy_part
|
|
end note
|
|
|
|
Uplink <-- Satellite: FinishCopyObjectRangeResponmse
|
|
|
|
Gateway <-- Uplink: CopyObjectRange return
|
|
|
|
S3Client <-- Gateway: 200 response
|
|
end
|
|
|
|
S3Client -> Gateway: POST /bucket/dest?uploadId=7tKsLOJgNs
|
|
|
|
Gateway -> Uplink: CommitUpload
|
|
note left
|
|
Bucket
|
|
Key
|
|
UploadID
|
|
CustomMetadata
|
|
end note
|
|
|
|
Uplink -> Satellite: ObjectCommitRequest
|
|
note left
|
|
StreamID
|
|
CustomMetadata //encypted//
|
|
end note
|
|
note right #lightgreen
|
|
Verify source object key and stream_id
|
|
is the same for every part.
|
|
|
|
Check that source object still exists
|
|
|
|
Verify part offsets and sizes
|
|
add up to entire object.
|
|
|
|
Change destination object status from
|
|
pending to committed.
|
|
end note
|
|
|
|
Uplink <-- Satellite: ObjectCommitResponse
|
|
|
|
Gateway <-- Uplink: CommitUpload return
|
|
|
|
S3Client <-- Gateway: 200 response
|
|
|
|
@enduml
|