38 typedef struct as_nodes_s {
62 typedef struct as_event_state_s {
84 typedef struct as_gc_item_s {
101 typedef struct as_cluster_s {
508 struct as_partition_shm_s;
517 as_cluster* cluster,
const char*
ns,
struct as_partition_shm_s* partition,
534 prev_node, replica, replica_size, replica_index);
538 replica, replica_size, replica_index);
549 if (node->
cluster->max_error_rate > 0) {
568 static inline uint32_t
581 uint32_t max = node->
cluster->max_error_rate;
#define as_aaf_uint32_rls(_target, _value)
static void as_node_put_connection(as_node *node, as_socket *sock)
as_thread_pool thread_pool
#define as_store_uint32(_target, _value)
uint32_t conn_pools_per_node
pthread_mutex_t tend_lock
static void as_node_close_connection(as_node *node, as_socket *sock, as_conn_pool *pool)
static void as_node_put_conn_error(as_node *node, as_socket *sock)
struct as_cluster_s * cluster
void(* as_release_fn)(void *value)
static void as_node_incr_error_count(as_node *node)
as_status as_cluster_create(as_config *config, as_error *err, as_cluster **cluster)
AS_EXTERN void as_nodes_destroy(as_nodes *nodes)
static void as_cluster_release_all_nodes(as_nodes *nodes)
uint32_t min_conns_per_node
as_node * as_partition_reg_get_node(as_cluster *cluster, const char *ns, as_partition *p, as_node *prev_node, as_policy_replica replica, uint8_t replica_size, uint8_t *replica_index)
AS_EXTERN as_status as_cluster_reserve_all_nodes(as_cluster *cluster, as_error *err, as_nodes **nodes)
bool use_services_alternate
uint32_t async_max_conns_per_node
uint32_t max_conns_per_node
uint32_t invalid_node_count
void as_cluster_get_node_names(as_cluster *cluster, int *n_nodes, char **node_names)
uint32_t login_timeout_ms
uint32_t async_min_conns_per_node
as_partition_tables partition_tables
as_cluster_event_callback event_callback
uint64_t max_socket_idle_ns_tran
#define as_load_uint32(_target)
uint32_t pipe_max_conns_per_node
static as_node * as_partition_get_node(as_cluster *cluster, const char *ns, void *partition, as_node *prev_node, as_policy_replica replica, uint8_t replica_size, uint8_t *replica_index)
struct as_shm_info_s * shm_info
bool fail_if_not_connected
void(* as_cluster_event_callback)(as_cluster_event *event)
pthread_mutex_t seed_lock
AS_EXTERN void as_cluster_add_seed(as_cluster *cluster, const char *hostname, const char *tls_name, uint16_t port)
static bool as_node_valid_error_count(as_node *node)
uint64_t max_socket_idle_ns_trim
#define as_load_ptr(_target)
void as_cluster_destroy(as_cluster *cluster)
static void as_node_reset_error_count(as_node *node)
AS_EXTERN as_node * as_node_get_by_name(as_cluster *cluster, const char *name)
as_status as_cluster_validate_size(as_cluster *cluster, as_error *err, uint32_t *size)
AS_EXTERN void as_cluster_remove_seed(as_cluster *cluster, const char *hostname, uint16_t port)
static uint32_t as_node_get_error_count(as_node *node)
static as_nodes * as_nodes_reserve(as_cluster *cluster)
bool as_cluster_is_connected(as_cluster *cluster)
#define as_incr_uint32(_target)
AS_EXTERN as_node * as_node_get_random(as_cluster *cluster)
void as_cluster_change_password(as_cluster *cluster, const char *user, const char *password, const char *password_hash)
as_event_state * event_state
void * event_callback_udata
static void as_nodes_release(as_nodes *nodes)
static void as_node_close_conn_error(as_node *node, as_socket *sock, as_conn_pool *pool)
uint32_t error_rate_window
as_node * as_partition_shm_get_node(as_cluster *cluster, const char *ns, struct as_partition_shm_s *partition, as_node *prev_node, as_policy_replica replica, uint8_t replica_size, uint8_t *replica_index)