![]() |
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 113 of file as_shm_cluster.h.
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 |
|
private |
Shared memory master mutex lock. Used to determine cluster tend owner.
Definition at line 184 of file as_shm_cluster.h.
|
private |
Total number of data partitions used by cluster.
Definition at line 148 of file as_shm_cluster.h.
as_node_shm as_cluster_shm::nodes[] |
Definition at line 202 of file as_shm_cluster.h.
|
private |
Maximum size of nodes array.
Definition at line 136 of file as_shm_cluster.h.
|
private |
Nodes generation count. Incremented whenever a node is added or removed from cluster.
Definition at line 142 of file as_shm_cluster.h.
|
private |
Current size of nodes array.
Definition at line 130 of file as_shm_cluster.h.
|
private |
Cluster tend owner process id.
Definition at line 124 of file as_shm_cluster.h.
|
private |
Pad to 8 byte boundary.
Definition at line 196 of file as_shm_cluster.h.
|
private |
Bytes required to hold one partition_table.
Definition at line 172 of file as_shm_cluster.h.
|
private |
Maximum size of partition tables array.
Definition at line 160 of file as_shm_cluster.h.
|
private |
Cluster offset to partition tables at the end of this structure.
Definition at line 166 of file as_shm_cluster.h.
|
private |
Current size of partition tables array.
Definition at line 154 of file as_shm_cluster.h.
|
private |
Has shared memory been fully initialized and populated.
Definition at line 190 of file as_shm_cluster.h.
|
private |
Spin lock for taking over from a dead cluster tender.
Definition at line 178 of file as_shm_cluster.h.
|
private |
Last time cluster was tended in milliseconds since epoch.
Definition at line 118 of file as_shm_cluster.h.