From 11b24011224899f598f8326e8f95faffeebafb07 Mon Sep 17 00:00:00 2001 From: lukechampine Date: Tue, 16 Mar 2021 16:04:45 -0400 Subject: [PATCH] kv: Mention deadlock risk in ForEachBlob docstring --- renter/renterutil/metadb.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/renter/renterutil/metadb.go b/renter/renterutil/metadb.go index 42a953f..e58a4c0 100644 --- a/renter/renterutil/metadb.go +++ b/renter/renterutil/metadb.go @@ -46,7 +46,9 @@ type MetaDB interface { AddBlob(b DBBlob) error Blob(key []byte) (DBBlob, error) DeleteBlob(key []byte) error - ForEachBlob(func(key []byte) error) error + + // ForEachBlob calls fn on each key. fn must not modify the DB. + ForEachBlob(fn func(key []byte) error) error AddChunk(m, n int, length uint64) (DBChunk, error) Chunk(id uint64) (DBChunk, error)