From 6997162c71890b96492186f370506bfb41837f05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Magiera?= Date: Wed, 3 Apr 2024 15:13:59 +0200 Subject: [PATCH] curio storage: Add missing reservation comment in MoveStorage --- curiosrc/ffi/sdr_funcs.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/curiosrc/ffi/sdr_funcs.go b/curiosrc/ffi/sdr_funcs.go index c68aa3c5c..325d30ef2 100644 --- a/curiosrc/ffi/sdr_funcs.go +++ b/curiosrc/ffi/sdr_funcs.go @@ -508,6 +508,9 @@ func (sb *SealCalls) MoveStorage(ctx context.Context, sector storiface.SectorRef var opts []storiface.AcquireOption if taskID != nil { 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 { defer resv.Release()