forked from TrueCloudLab/frostfs-sdk-go
[#252] patcher: Fix applying patch from the same offset
Signed-off-by: Airat Arifullin <a.arifullin@yadro.com>
This commit is contained in:
parent
908c96a94d
commit
98aabc45a7
2 changed files with 27 additions and 0 deletions
|
@ -190,6 +190,8 @@ func (p *patcher) copyRange(ctx context.Context, rng *objectSDK.Range) error {
|
|||
}
|
||||
|
||||
func (p *patcher) applyPatch(ctx context.Context, payloadPatch *objectSDK.PayloadPatch, offset uint64) (newOffset uint64, err error) {
|
||||
newOffset = offset
|
||||
|
||||
// write the original payload chunk before the start of the patch
|
||||
if payloadPatch.Range.GetOffset() > offset {
|
||||
rng := new(objectSDK.Range)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue