curio storage: Add missing reservation comment in MoveStorage

This commit is contained in:
Łukasz Magiera 2024-04-03 15:13:59 +02:00 committed by Łukasz Magiera
parent 316a0d6c26
commit 6997162c71

View File

@ -508,6 +508,9 @@ func (sb *SealCalls) MoveStorage(ctx context.Context, sector storiface.SectorRef
var opts []storiface.AcquireOption var opts []storiface.AcquireOption
if taskID != nil { if taskID != nil {
resv, ok := sb.sectors.storageReservations.Load(*taskID) resv, ok := sb.sectors.storageReservations.Load(*taskID)
// if the reservation is missing MoveStorage will simply create one internally. This is fine as the reservation
// will only be missing when the node is restarting, which means that the missing reservations will get recreated
// anyways, and before we start claiming other tasks.
if ok { if ok {
defer resv.Release() defer resv.Release()