Skip to content

Commit

Permalink
fix: engine uses the consolidated map
Browse files Browse the repository at this point in the history
Signed-off-by: Shuo Wu <[email protected]>
  • Loading branch information
shuo-wu committed Nov 5, 2024
1 parent 0e0e03d commit 42c6b02
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 @@ -1812,12 +1812,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 42c6b02

Please sign in to comment.