[#9999] getSvc: Fix Head EC1.1
All checks were successful
DCO action / DCO (pull_request) Successful in 1m8s
Tests and linters / Run gofumpt (pull_request) Successful in 2m7s
Vulncheck / Vulncheck (pull_request) Successful in 2m24s
Pre-commit hooks / Pre-commit (pull_request) Successful in 2m30s
Build / Build Components (pull_request) Successful in 2m42s
Tests and linters / gopls check (pull_request) Successful in 2m55s
Tests and linters / Staticcheck (pull_request) Successful in 3m18s
Tests and linters / Lint (pull_request) Successful in 4m6s
Tests and linters / Tests (pull_request) Successful in 6m33s
Tests and linters / Tests with -race (pull_request) Successful in 6m43s

If local EC chunk found, but remote node is off, then `HEAD --raw` request
returns object not found.

Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
Dmitrii Stepanov 2024-09-23 15:07:10 +03:00
parent 0b87be804a
commit 622d8b0a71

View file

@ -26,8 +26,10 @@ func (r *request) executeOnContainer(ctx context.Context) {
return
}
localStatus := r.status
for {
if r.processCurrentEpoch(ctx) {
if r.processCurrentEpoch(ctx, localStatus) {
break
}
@ -43,7 +45,7 @@ func (r *request) executeOnContainer(ctx context.Context) {
}
}
func (r *request) processCurrentEpoch(ctx context.Context) bool {
func (r *request) processCurrentEpoch(ctx context.Context, localStatus int) bool {
r.log.Debug(logs.ProcessEpoch,
zap.Uint64("number", r.curProcEpoch),
)
@ -56,7 +58,11 @@ func (r *request) processCurrentEpoch(ctx context.Context) bool {
ctx, cancel := context.WithCancel(ctx)
defer cancel()
r.status = statusUndefined
if localStatus == statusEC { // possible only for raw == true and local == false
r.status = statusEC
} else {
r.status = statusUndefined
}
for {
addrs := traverser.Next()