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 <chin-ya.huang@suse.com>
  • Loading branch information
c3y1huang authored and derekbit committed Nov 6, 2024
1 parent fe6f411 commit 4642db1
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 4642db1

Please sign in to comment.