Docs GODI Archive
Projects Blog Knowledge

Look up function:

(e.g. "List.find" or "keysym")
More options

Module Nn_state


module Nn_state: sig .. end
State manager: Provide the logical view of the state, and forward changes to the database and to the nameslaves (2-phase commit)

type errno = Plasma_util.errno 
exception Transaction_error of errno
class type shared_state_t = object .. end
This object exists once in the nn_master container, and collects information from not yet committed views (such as which ID's are used), so that the views can avoid clashes between each other.
type rpolicy = [ `Balanced of int ] 
- `Balanced factor: Blocks are allocated on all datanodes, so that the nodes fill up similarly. The int is the replication factor
type journal = Nn_db.modification Queue.t 
A journal is a queue of database modifications. Journals are the entities that are sent to the slaves
class type view_t = object .. end
A view is a high-level transaction, involving both the local db and the slaves
class type ds_view_t = object .. end
View on datastore state

type transacted_datastores = {
   td_idlist : int list; (*IDs of datastores participating in a transaction*)
   td_safetrans_id : int64; (*safetrans id*)
   td_safetrans_secret : int64; (*per transaction secret*)
   td_safetrans_tmo : int64; (*timeout for data transaction*)
}
class type bm_view_t = object .. end
View on blockmap state:
class type inode_view_t = object .. end

The following classes are used as follows: First, a shared_state is created. This object is passed on as arguments to the view objects. The views, if all connected with the same shared_state, can be committed in one go (in Nn_commit).
class shared_state : Unixqueue.event_system -> Nn_config.nn_node_config -> int -> string -> shared_state_t
class ds_view : shared_state_t -> ds_view_t
class bm_view : shared_state_t -> bm_view_t
class inode_view : shared_state_t -> inode_view_t
val encap_time : float -> Pfs_rpcapi_aux.time
Turn the time (as seconds since epoch) into the RPC version
This web site is published by Informatikbüro Gerd Stolpmann
Powered by Caml