21 #include <citrusleaf/cf_queue.h>
28 #include <aerospike/ck/ck_spinlock.h>
29 #include <aerospike/ck/ck_swlock.h>
39 typedef struct as_node_shm_s {
56 struct sockaddr_storage addr;
87 typedef struct as_partition_shm_s {
105 typedef struct as_partition_table_shm_s {
127 typedef struct as_cluster_shm_s {
225 typedef struct as_shm_info_s {
uint32_t partition_tables_size
as_cluster_shm * cluster_shm
volatile bool is_tend_master
void as_shm_remove_nodes(struct as_cluster_s *cluster, as_vector *nodes_to_remove)
uint32_t takeover_threshold_ms
static as_partition_table_shm * as_shm_get_partition_table(as_cluster_shm *cluster_shm, as_partition_table_shm *tables, uint32_t index)
void as_shm_update_partitions(as_shm_info *shm_info, const char *ns, char *bitmap_b64, int64_t len, as_node *node, bool master)
#define AS_NODE_NAME_SIZE
uint32_t partition_tables_offset
void as_shm_destroy(struct as_cluster_s *cluster)
uint32_t partition_tables_capacity
as_status as_shm_create(struct as_cluster_s *cluster, as_error *err, as_config *config)
as_node * as_shm_node_get(struct as_cluster_s *cluster, const char *ns, const uint8_t *digest, as_policy_replica replica, bool master)
void as_shm_add_nodes(struct as_cluster_s *cluster, as_vector *nodes_to_add)
static as_partition_table_shm * as_shm_get_partition_tables(as_cluster_shm *cluster_shm)
uint32_t partition_table_byte_size
#define AS_MAX_NAMESPACE_SIZE
ck_spinlock_t take_over_lock
static as_partition_table_shm * as_shm_next_partition_table(as_cluster_shm *cluster_shm, as_partition_table_shm *table)