Splitting object on client works incorrectly without ResolveFrostFSFailures flag #129

Closed
opened 2023-07-26 11:16:39 +00:00 by fyrchik · 1 comment
Owner

Here we set the result status:

if err == nil {

And the error will be nil if we do not convert status to errors:

st := apistatus.FromStatusV2(resp.GetMetaHeader().GetStatus())

The bad scenario:

  1. Writing the first part finished with an error (e.g. AccessDenied because the neo-go lagged behind and we have an old eACL).
  2. Writing the second part is OK and has overridden the error status.
  3. We think the object is written, but it is not.
Here we set the result status: https://git.frostfs.info/TrueCloudLab/frostfs-sdk-go/src/commit/5defed4ab43591f6a2d3247237382b0ef7829fd7/client/object_put_transformer.go#L103 And the error _will_ be nil if we do not convert status to errors: https://git.frostfs.info/TrueCloudLab/frostfs-sdk-go/src/commit/5defed4ab43591f6a2d3247237382b0ef7829fd7/client/common.go#L275 The bad scenario: 1. Writing the first part finished with an error (e.g. AccessDenied because the neo-go lagged behind and we have an old eACL). 2. Writing the second part is OK and has overridden the error status. 3. We think the object is written, but it is not.
fyrchik added the
bug
label 2023-07-26 11:16:39 +00:00
Author
Owner

frostfs-cli is resolving errors, to test this remove this line

`frostfs-cli` is resolving errors, to test this remove this line https://git.frostfs.info/TrueCloudLab/frostfs-node/src/commit/5ff82ff04f673f728ee7b9a081d9a79809681c2c/cmd/frostfs-cli/internal/client/sdk.go#L53
fyrchik self-assigned this 2023-07-26 11:18:25 +00:00
fyrchik added the
P1
label 2023-07-26 11:54:12 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: TrueCloudLab/frostfs-sdk-go#129
No description provided.