package tezos-store
Install
    
    dune-project
 Dependency
Authors
Maintainers
Sources
sha256=43723d096307603703a1a89ed1b2eb202b365f5e7824b96b0cbf813b343a6cf7
    
    
  sha512=b2a637f2e965000d3d49ad85277ca24d6cb07a1a7cf2bc69d296d8b03ad78c3eaa8e21e94b9162e62c2e11649cd03bc845b2a3dafe623b91065df69d47dc8e4f
    
    
  doc/tezos-store.unix/Tezos_store_unix/Floating_block_index/index.html
Module Tezos_store_unix.Floating_block_indexSource
Floating blocks index map
Block info stored in the index map
Module Block_info represents the values stored in the index which are used to locate the position of a block in a floating block store and its predecessors.
Key/value index associated to a floating block store where the key is a Block_hash.t and the value is Block_info.t.
include Index.S
  with type key = Tezos_base.TzPervasives.Block_hash.t
   and type value = Block_info.t
type key = Tezos_base.TzPervasives.Block_hash.tThe type for keys.
type value = Block_info.tThe type for values.
val empty_cache : unit -> cacheConstruct a new empty cache of index instances.
val v : 
  ?flush_callback:(unit -> unit) ->
  ?cache:cache ->
  ?fresh:bool ->
  ?readonly:bool ->
  ?throttle:[ `Overcommit_memory | `Block_writes ] ->
  ?lru_size:int ->
  log_size:int ->
  string ->
  tThe constructor for indexes.
This can be used to ensure certain pre-conditions are met before bindings are persisted to disk. (For instance, if the index bindings are pointers into another data-structure d, it may be necessary to flush d first to avoid creating dangling pointers.)
val clear : t -> unitclear t clears t so that there are no more bindings in it.
replace t k v binds k to v in t, replacing any existing binding of k.
If 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 -> unitFlushes all internal buffers of the IO instances.
- Passing ~no_callback:()disables calling theflush_callbackpassed tov.
- If with_fsyncistrue, this also flushes the OS caches for eachIOinstance.
val close : ?immediately:unit -> t -> unitCloses all resources used by t, flushing any internal buffers in the instance.
If immediately is passed, this operation will abort any ongoing background processes. This guarantees not to corrupt the store, but may require additional work to be done on the next startup.
val sync : t -> unitsync 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 -> boolis_merging t returns true if t is running a merge. Raises RO_not_allowed if called by a read-only index.
val merge : t -> unitmerge t forces a merge for t.
If there is no merge running, this operation is non-blocking, i.e. it returns immediately, with the merge running concurrently.
If a merge is running already, this operation blocks until the previous merge is complete. It then launches a merge (which runs concurrently) and returns.