Plasma GitLab Archive
Projects Blog Knowledge

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
type counter_name = [ `Commits_total | `RPC_filesystem | `Transactions_total ] 
Performance counters:
  • `Transactions_total: number of transaction starts
  • `Commits_total: number of writing commits
  • `RPC_filesystem: number of RPC calls of the "Filesystem" program

val string_of_counter_name : counter_name -> string
val counters : counter_name list
type owner 
val create_owner : unit -> owner
val string_of_owner : owner -> string
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 sh_state_shm 
The shm part of shared_state_t. This type is marshallable.
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
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).
val sh_state_shm : Netmcore.res_id -> int -> string -> sh_state_shm
class shared_state : Unixqueue.event_system -> Nn_config.nn_node_config -> Pfs_auth.client_auth -> sh_state_shm -> shared_state_t
class revclear_view : view_t
This "view" just removes all revisions, and replaces them with a single successor
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