Skip to content

Commit

Permalink
fix: undefined e.ReplicaAddressMap
Browse files Browse the repository at this point in the history
longhorn/longhorn-9244

Signed-off-by: Chin-Ya Huang <[email protected]>
  • Loading branch information
c3y1huang committed Nov 6, 2024
1 parent 415584c commit f8f592f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/spdk/engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -1897,12 +1897,12 @@ func (e *Engine) waitForRestoreComplete() error {
var err error
for range periodicChecker.C {
isReplicaRestoreCompleted := true
for replicaName, replicaAddress := range e.ReplicaAddressMap {
if e.ReplicaModeMap[replicaName] != types.ModeRW {
for replicaName, replicaStatus := range e.ReplicaStatusMap {
if replicaStatus.Mode != types.ModeRW {
continue
}

isReplicaRestoreCompleted, err = e.isReplicaRestoreCompleted(replicaName, replicaAddress)
isReplicaRestoreCompleted, err = e.isReplicaRestoreCompleted(replicaName, replicaStatus.Address)
if err != nil {
return errors.Wrapf(err, "failed to check replica %s restore status", replicaName)
}
Expand Down

0 comments on commit f8f592f

Please sign in to comment.