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
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
).
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