All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Data Fields | Private Attributes
as_cluster_shm Struct Reference

Detailed Description

Shared memory cluster map. The map contains fixed arrays of nodes and partition tables. Each partition table contains a fixed array of partitions. The shared memory segment will be sized on startup and never change afterwards. If the max nodes or max namespaces are reached, the tender client will ignore additional nodes/namespaces and log an error message that the corresponding array is full.

Definition at line 139 of file as_shm_cluster.h.

+ Collaboration diagram for as_cluster_shm:

Data Fields

as_node_shm nodes []
 

Private Attributes

uint8_t lock
 
uint32_t n_partitions
 
uint32_t nodes_capacity
 
uint32_t nodes_gen
 
uint32_t nodes_size
 
uint32_t owner_pid
 
char pad [6]
 
uint32_t partition_table_byte_size
 
uint32_t partition_tables_capacity
 
uint32_t partition_tables_offset
 
uint32_t partition_tables_size
 
uint8_t ready
 
ck_spinlock_t take_over_lock
 
uint64_t timestamp
 

Field Documentation

uint8_t as_cluster_shm::lock
private

Shared memory master mutex lock. Used to determine cluster tend owner.

Definition at line 210 of file as_shm_cluster.h.

uint32_t as_cluster_shm::n_partitions
private

Total number of data partitions used by cluster.

Definition at line 174 of file as_shm_cluster.h.

as_node_shm as_cluster_shm::nodes[]

Definition at line 228 of file as_shm_cluster.h.

uint32_t as_cluster_shm::nodes_capacity
private

Maximum size of nodes array.

Definition at line 162 of file as_shm_cluster.h.

uint32_t as_cluster_shm::nodes_gen
private

Nodes generation count. Incremented whenever a node is added or removed from cluster.

Definition at line 168 of file as_shm_cluster.h.

uint32_t as_cluster_shm::nodes_size
private

Current size of nodes array.

Definition at line 156 of file as_shm_cluster.h.

uint32_t as_cluster_shm::owner_pid
private

Cluster tend owner process id.

Definition at line 150 of file as_shm_cluster.h.

char as_cluster_shm::pad[6]
private

Pad to 8 byte boundary.

Definition at line 222 of file as_shm_cluster.h.

uint32_t as_cluster_shm::partition_table_byte_size
private

Bytes required to hold one partition_table.

Definition at line 198 of file as_shm_cluster.h.

uint32_t as_cluster_shm::partition_tables_capacity
private

Maximum size of partition tables array.

Definition at line 186 of file as_shm_cluster.h.

uint32_t as_cluster_shm::partition_tables_offset
private

Cluster offset to partition tables at the end of this structure.

Definition at line 192 of file as_shm_cluster.h.

uint32_t as_cluster_shm::partition_tables_size
private

Current size of partition tables array.

Definition at line 180 of file as_shm_cluster.h.

uint8_t as_cluster_shm::ready
private

Has shared memory been fully initialized and populated.

Definition at line 216 of file as_shm_cluster.h.

ck_spinlock_t as_cluster_shm::take_over_lock
private

Spin lock for taking over from a dead cluster tender.

Definition at line 204 of file as_shm_cluster.h.

uint64_t as_cluster_shm::timestamp
private

Last time cluster was tended in milliseconds since epoch.

Definition at line 144 of file as_shm_cluster.h.


The documentation for this struct was generated from the following file: