Fix #204 (full Multipart Uploads semantics) #553
No reviewers
Labels
No labels
action
check-aws
action
discussion-needed
action
for-external-contributors
action
for-newcomers
action
more-info-needed
action
need-funding
action
triage-required
kind
correctness
kind
ideas
kind
improvement
kind
performance
kind
testing
kind
usability
kind
wrong-behavior
prio
critical
prio
low
scope
admin-api
scope
background-healing
scope
build
scope
documentation
scope
k8s
scope
layout
scope
metadata
scope
ops
scope
rpc
scope
s3-api
scope
security
scope
telemetry
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: Deuxfleurs/garage#553
Loading…
Reference in a new issue
No description provided.
Delete branch "nlnet-task1"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Tis PR tracks progress of Task 1 of the NLnet Garage project started in April 2023, which consists in fixing Issue #204.
Check some basic facts against Minio
?partNumber=4
on GetObject to get the part that was originally uploaded with number 6.Design changes required to Garage's internal datastructures to properly implement multipart uploads
Version
, a temporaryMultipartUpload
entry is created to store all uploaded parts. TheMultipartUpload
table is a new table added in the data model by this PR.Version
is created by each call toUploadPart
, which contains only the data uploaded for this part. TheMultipartUpload
contains the identifiers of all of these versions, with some metadata (part number, timestamp of upload, size, etag).MultipartUpload
can contain several version identifiers for the same part number, if they have different upload timestamp. This is what allows an already uploaded part to be reuploaded in order to fix #204. When completing the multipart object, only theVersion
with the latest upload timestamp is taken into account.Version
s referenced in theMultipartUpload
are short-lived, they are deleted at the same time than theMultipartUpload
when it is completed or aborted.Version
for each part are combined into a single bigVersion
for the entire object, which is constructed in the same way as how multipart uploads were done before. This means that no changes need to be made to the GetObject call.Version
s will, by definition, reference the same data blocks as final objectVersion
s. This means that when an upload is completed and the final version is created, the reference counter for each block will be decremented once (for the temporary versions that are deleted) and incremented once (for the final version that is created). The decrement is done asynchronously during cleanup, after the CompleteMultipartUpload and therefore after the increment, preventing the reference counters from going to zero.MultipartUpload
object is temporary, so are the part numbers that it contains. This allows part renumbering (and skipping uploaded parts) to be done in CompleteMultipartUpload when the finalVersion
is created.Implement these changes and the correct multipart upload tracking
Testing and validation
This PR has been merged, marking the completion of Task 1
05e0848a92
to9d464ccc96
9d464ccc96
to90303983fa
90303983fa
to325aa02593
a80b463f6e
tob41e71126a
99183df1b8
tod0022b83bd
10fb503cdb
todaf4620eac
e13268c03b
toff5b1f47fe
ff5b1f47fe
to936d145767
620623d3a6
to911cc74469
93f902729f
to9f1d1d4366
9f1d1d4366
to5cce28c84a
4b75f70ddf
tocc6b96eee2
cc6b96eee2
to0781b35038
dca883efcd
to459964c3be
459964c3be
toc3920b97ac
c3920b97ac
to700b68f590
700b68f590
to5f3d4bf78c
5f3d4bf78c
toe645bbd3ce
WIP: Fix #204 (full Multipart Uploads semantics)to Fix #204 (full Multipart Uploads semantics)