Fix PutSingle
with OID that was already removed #1579
2 changed files with 4 additions and 0 deletions
|
@ -14,6 +14,7 @@ import (
|
|||
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/core/policy"
|
||||
svcutil "git.frostfs.info/TrueCloudLab/frostfs-node/pkg/services/object/util"
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/services/object_manager/placement"
|
||||
clientSDK "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/client"
|
||||
containerSDK "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/container"
|
||||
objectSDK "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/object"
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-sdk-go/object/erasurecode"
|
||||
|
@ -274,6 +275,8 @@ func (e *ECWriter) writePart(ctx context.Context, obj *objectSDK.Object, partIdx
|
|||
err := e.putECPartToNode(ctx, obj, node)
|
||||
if err == nil {
|
||||
return nil
|
||||
} else if clientSDK.IsErrObjectAlreadyRemoved(err) {
|
||||
return err
|
||||
}
|
||||
e.Config.Logger.Warn(ctx, logs.ECFailedToSaveECPart, zap.Stringer("part_address", object.AddressOf(obj)),
|
||||
zap.Stringer("parent_address", obj.ECHeader().Parent()), zap.Int("part_index", partIdx),
|
||||
|
|
|
@ -352,6 +352,7 @@ func (s *Service) redirectPutSingleRequest(ctx context.Context,
|
|||
err = signature.VerifyServiceMessage(resp)
|
||||
if err != nil {
|
||||
err = fmt.Errorf("response verification failed: %w", err)
|
||||
return
|
||||
}
|
||||
|
||||
fyrchik marked this conversation as resolved
Outdated
|
||||
st := apistatus.FromStatusV2(resp.GetMetaHeader().GetStatus())
|
||||
dstepanov-yadro
commented
```
err = signature.VerifyServiceMessage(resp)
if err != nil {
err = fmt.Errorf("response verification failed: %w", err)
return <----------------------- add this
}
st := apistatus.FromStatusV2(resp.GetMetaHeader().GetStatus())
err = apistatus.ErrFromStatus(st)
```
aarifullin
commented
Correct! Fixed Correct! Fixed
|
||||
|
|
Loading…
Add table
Reference in a new issue
Could you point me at an example of where we already use similar logic?
These lines seem out of place to me.
https://git.frostfs.info/TrueCloudLab/frostfs-sdk-go/src/branch/master/client/object_put_single.go#L162-L174
https://git.frostfs.info/TrueCloudLab/frostfs-sdk-go/src/branch/master/client/common.go#L100
Both links are from the SDK, I mean in the node.
This line is rather generic, I do not understand why
PutSingle
is special.headRequest -> verifyResponse