include Index.S with type value = int64 * int * char
val empty_cache : unit -> cache
Construct a new empty cache of index instances.
val clear : t -> unit
clear t clears
t so that there are no more bindings in it.
replace t k v binds
t, replacing any existing binding of
overcommit is true, the operation does not triger a merge, even if the caches are full. By default
overcommit is false.
filter t p removes all the bindings (k, v) that do not satisfy
p. This operation is costly and blocking.
Iterates over the index bindings. Limitations:
- Order is not specified.
- In case of recent replacements of existing values (since the last merge), this will hit both the new and old bindings.
- May not observe recent concurrent updates to the index by other processes.
val flush : ?no_callback:unit -> ?with_fsync:bool -> t -> unit
Flushes all internal buffers of the
~no_callback:()disables calling the
true, this also flushes the OS caches for each
val sync : t -> unit
sync t syncs a read-only index with the files on disk. Raises
RW_not_allowed if called by a read-write index.
val is_merging : t -> bool
is_merging t returns true if
t is running a merge. Raises
RO_not_allowed if called by a read-only index.
val try_merge : t -> unit
try_merge is like
merge but is a no-op if the number of entries in the write-ahead log is smaller than
module Checks : sig ... end
fsck-like utility for checking the integrity of Index stores built using this module.
val v : ?flush_callback:(unit -> unit) -> ?fresh:bool -> ?readonly:bool -> ?throttle:[ `Block_writes | `Overcommit_memory ] -> log_size:int -> string -> t
Constructor for indices, memoized by
(path, readonly) pairs.
val close : t -> unit
val merge : t -> unit
module Stats = Index.Stats