File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -52,11 +52,15 @@ module Make (Data : Binable.S) = struct
5252 let res = { idx } in
5353 (* When this reference is GC'd, delete the file. *)
5454 Gc.Expert. add_finalizer_last_exn res (fun () ->
55- [% log debug] " Data at %d is GCed, removing from LMDB cache " idx
55+ [% log debug] " Data at %d is GCed, marking as garbage " idx
5656 ~metadata: [ (" index" , `Int idx) ] ;
5757 Hash_set. add garbage idx ) ;
5858 if Hash_set. length garbage > = garbage_size_limit then (
59- Hash_set. iter garbage ~f: (fun to_remove -> Rw. remove ~env db to_remove) ;
59+ Hash_set. iter garbage ~f: (fun to_remove ->
60+ [% log debug] " Instructing LMDB to remove garbage at index %d"
61+ to_remove
62+ ~metadata: [ (" index" , `Int to_remove) ] ;
63+ Rw. remove ~env db to_remove ) ;
6064 Hash_set. clear garbage ) ;
6165 Rw. set ~env db idx x ;
6266 res
You can’t perform that action at this time.
0 commit comments