Module Frontend.Writer_1
The writer is responsible for taking updates and recording in log, and periodically rotating logs and firing the merge process.
module F = Control_fieldstype check_merge_t={pid : int;gen : int;}type t={max_log_len : int;ctl : Control.t;mutable prev_map : (KV.k, [ `Insert of KV.v | `Delete ]) Stdlib.Hashtbl.t;mutable gen : int;mutable curr_log : Log_file_w.t;mutable curr_map : (KV.k, [ `Insert of KV.v | `Delete ]) Stdlib.Hashtbl.t;mutable check_merge : check_merge_t option;mutable nv_map_ss : Nv_map_ss_.t;lru_ss : Kv_hash__.Util.Lru_ss.t;debug : (KV.k, KV.v) Stdlib.Hashtbl.t;debug_log : Stdlib.out_channel;}check_merge: whether we need to check the old merge has completed before launching a new one; the int is the pid
lru_ss: an Lru that sits behind the logs but in front of nv_map_ss
val create : ?max_log_len:int -> ?ctl_fn:string -> ?buckets_fn:string -> ?values_fn:string -> unit -> tval open_ : ?max_log_len:int -> ?ctl_fn:string -> ?buckets_fn:string -> ?values_fn:string -> unit -> unitval switch_logs : t -> unitval find_opt : t -> KV.k -> KV.v optionval insert : t -> KV.k -> KV.v -> unitval delete : 'a -> 'b -> 'cval close : t -> unit
module With_debug : functor () sig ... endDebugging versions