Skip to content

Commit

Permalink
set alloc root
Browse files Browse the repository at this point in the history
  • Loading branch information
Hitenjain14 committed Jan 11, 2025
1 parent b336a0b commit f72c706
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions zboxcore/sdk/rollback.go
Original file line number Diff line number Diff line change
Expand Up @@ -516,6 +516,7 @@ func (a *Allocation) checkStatusV2(markerChan chan *RollbackBlobber, blobStatus
}

if len(latestVersionMap[allVersionConensus]) >= a.DataShards {
a.allocationRoot = allVersionConensus
return Repair, blobStatus, nil
}
l.Logger.Info("Rolling back to previous version")
Expand Down Expand Up @@ -545,6 +546,7 @@ func (a *Allocation) checkStatusV2(markerChan chan *RollbackBlobber, blobStatus
if successCnt < int32(consensusThresh) {
return Broken, blobStatus, common.NewError("rollback_failed", "Rollback failed")
}
a.allocationRoot = allVersionConensus
if successCnt == int32(fullConsensus) {
return Repair, blobStatus, nil
}
Expand Down

0 comments on commit f72c706

Please sign in to comment.