We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3404272 commit 2316ea9Copy full SHA for 2316ea9
src/lib/disk_cache/lmdb/disk_cache.ml
@@ -53,6 +53,10 @@ module Make (Data : Binable.S) = struct
53
let res = { idx } in
54
(* When this reference is GC'd, delete the file. *)
55
Gc.Expert.add_finalizer_last_exn res (fun () ->
56
+ (* The actual deletion is delayed, as GC maybe triggered in LMDB's
57
+ critical section. LMDB critical section then will be re-entered if
58
+ it's invoked directly in a GC hook.
59
+ This causes mutex double-acquiring and node freezes. *)
60
[%log debug] "Data at %d is GCed, marking as garbage" idx
61
~metadata:[ ("index", `Int idx) ] ;
62
Hash_set.add garbage idx ) ;
0 commit comments