forked from TrueCloudLab/frostfs-node
[#1390] getSvc: Fix Head EC1.1
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:
parent
0b87be804a
commit
d4493a6d08
1 changed files with 9 additions and 3 deletions
|
@ -26,8 +26,10 @@ func (r *request) executeOnContainer(ctx context.Context) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
localStatus := r.status
|
||||||
|
|
||||||
for {
|
for {
|
||||||
if r.processCurrentEpoch(ctx) {
|
if r.processCurrentEpoch(ctx, localStatus) {
|
||||||
break
|
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,
|
r.log.Debug(logs.ProcessEpoch,
|
||||||
zap.Uint64("number", r.curProcEpoch),
|
zap.Uint64("number", r.curProcEpoch),
|
||||||
)
|
)
|
||||||
|
@ -56,7 +58,11 @@ func (r *request) processCurrentEpoch(ctx context.Context) bool {
|
||||||
ctx, cancel := context.WithCancel(ctx)
|
ctx, cancel := context.WithCancel(ctx)
|
||||||
defer cancel()
|
defer cancel()
|
||||||
|
|
||||||
r.status = statusUndefined
|
if localStatus == statusEC { // possible only for raw == true and local == false
|
||||||
|
r.status = statusEC
|
||||||
|
} else {
|
||||||
|
r.status = statusUndefined
|
||||||
|
}
|
||||||
|
|
||||||
for {
|
for {
|
||||||
addrs := traverser.Next()
|
addrs := traverser.Next()
|
||||||
|
|
Loading…
Reference in a new issue