Skip to content

Commit 8c2d7c8

Browse files
committed
lock alloc for update
1 parent 49d90bc commit 8c2d7c8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

code/go/0chain.net/blobbercore/handler/storage_handler.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -708,8 +708,8 @@ func (fsh *StorageHandler) getReferencePathV2(ctx context.Context, r *http.Reque
708708
return
709709
}
710710
allocMu := lock.GetMutex(allocation.Allocation{}.TableName(), allocationId)
711-
allocMu.RLock()
712-
defer allocMu.RUnlock()
711+
allocMu.Lock()
712+
defer allocMu.Unlock()
713713
now := time.Now()
714714

715715
trie := allocationObj.GetTrie()

0 commit comments

Comments
 (0)