[#462] Implement PATCH for simple objects #462
No reviewers
Labels
No labels
P0
P1
P2
P3
good first issue
Infrastructure
blocked
bug
config
discussion
documentation
duplicate
enhancement
go
help wanted
internal
invalid
kludge
observability
perfomance
question
refactoring
wontfix
No project
No assignees
5 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: TrueCloudLab/frostfs-s3-gw#462
Loading…
Reference in a new issue
No description provided.
Delete branch "mbiryukova/frostfs-s3-gw:feature/patch_object"
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?
Signed-off-by: Marina Biryukova m.biryukova@yadro.com
c242586506
to704117c7bb
[#xxx] Implement PATCH for simple objectsto [#462] Implement PATCH for simple objects704117c7bb
to5fdb834e56
@ -392,0 +400,4 @@
var rng object.Range
rng.SetOffset(prm.Range.Start)
rng.SetLength(prm.Range.End - prm.Range.Start + 1)
if prm.Range.End >= prm.ObjectSize {
If the hanlder gets
bytes=0-0
, then range will beoffset = 0, length = 1
?Have you checked the patching with
0,0
?If handler gets range
0-0
, it means that we have to replace the first byte of object with received one. Result is correctS3 PATCH spec supports a more narrow set of usecases, e.g. it seems impossible to "just insert" and patch should always be equal in length to the part it replaces.
This is important detail
OK with me. I have expected that
pool
would be used like in this PRLGTM
@ -534,0 +571,4 @@
}
n.prepareAuthParameters(ctx, &prmHead.PrmAuth, p.BktInfo.Owner)
obj, err := n.frostFS.HeadObject(ctx, prmHead)
Why don't we use just
instead of
?
Changed
5fdb834e56
toa16720da17
@ -0,0 +152,4 @@
return nil, fmt.Errorf("unknown unit in range header")
}
parts := strings.Split(strings.TrimPrefix(rangeStr, prefix), "/")
strings.Cut
? It is intended to be used for 2 parts.a16720da17
to40866df3a9