[#9999] ec: Check all parts are saved
Some checks failed
Tests and linters / gopls check (pull_request) Failing after 3m54s
Pre-commit hooks / Pre-commit (pull_request) Successful in 4m0s
DCO action / DCO (pull_request) Successful in 5m50s
Vulncheck / Vulncheck (pull_request) Successful in 6m30s
Tests and linters / Tests with -race (pull_request) Successful in 6m42s
Build / Build Components (pull_request) Successful in 6m59s
Tests and linters / Staticcheck (pull_request) Successful in 7m15s
Tests and linters / Tests (pull_request) Successful in 7m32s
Tests and linters / Lint (pull_request) Successful in 8m7s
Some checks failed
Tests and linters / gopls check (pull_request) Failing after 3m54s
Pre-commit hooks / Pre-commit (pull_request) Successful in 4m0s
DCO action / DCO (pull_request) Successful in 5m50s
Vulncheck / Vulncheck (pull_request) Successful in 6m30s
Tests and linters / Tests with -race (pull_request) Successful in 6m42s
Build / Build Components (pull_request) Successful in 6m59s
Tests and linters / Staticcheck (pull_request) Successful in 7m15s
Tests and linters / Tests (pull_request) Successful in 7m32s
Tests and linters / Lint (pull_request) Successful in 8m7s
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
parent
ce55e1579b
commit
9eb5e5f00c
1 changed files with 11 additions and 1 deletions
|
@ -25,7 +25,10 @@ import (
|
|||
|
||||
var _ transformer.ObjectWriter = (*ecWriter)(nil)
|
||||
|
||||
var errUnsupportedECObject = errors.New("object is not supported for erasure coding")
|
||||
var (
|
||||
errUnsupportedECObject = errors.New("object is not supported for erasure coding")
|
||||
errFailedToSaveAllECParts = errors.New("failed to save all EC parts")
|
||||
)
|
||||
|
||||
type ecWriter struct {
|
||||
cfg *cfg
|
||||
|
@ -235,6 +238,13 @@ func (e *ecWriter) writeRawObject(ctx context.Context, obj *objectSDK.Object) er
|
|||
singleErr: err,
|
||||
}
|
||||
}
|
||||
for idx := range partsProcessed {
|
||||
if !partsProcessed[idx].Load() {
|
||||
return errIncompletePut{
|
||||
singleErr: errFailedToSaveAllECParts,
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue