39typedef struct as_nodes_s {
63typedef struct as_event_state_s {
85typedef struct as_gc_item_s {
102typedef struct as_cluster_s {
584struct as_partition_shm_s;
593 as_cluster* cluster,
const char* ns,
struct as_partition_shm_s* partition,
627static inline uint64_t
657static inline uint64_t
677static inline uint64_t
696 prev_node, replica, replica_size, replica_index);
700 replica, replica_size, replica_index);
711 if (node->
cluster->max_error_rate > 0) {
730static inline uint32_t
743 uint32_t max = node->
cluster->max_error_rate;
#define as_load_ptr(_target)
#define as_incr_uint64(_target)
#define as_faa_uint64(_target, _value)
#define as_incr_uint32(_target)
#define as_load_uint64(_target)
#define as_aaf_uint32_rls(_target, _value)
#define as_load_uint32(_target)
#define as_store_uint32(_target, _value)
static void as_node_close_conn_error(as_node *node, as_socket *sock, as_conn_pool *pool)
static uint64_t as_cluster_get_tran_count(const as_cluster *cluster)
as_status as_cluster_validate_size(as_cluster *cluster, as_error *err, uint32_t *size)
static uint64_t as_cluster_get_delay_queue_timeout_count(const as_cluster *cluster)
void as_cluster_destroy(as_cluster *cluster)
AS_EXTERN void as_cluster_remove_seed(as_cluster *cluster, const char *hostname, uint16_t port)
static void as_cluster_add_retries(as_cluster *cluster, uint32_t count)
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)
void as_cluster_change_password(as_cluster *cluster, const char *user, const char *password, const char *password_hash)
static void as_node_incr_error_rate(as_node *node)
static void as_cluster_release_all_nodes(as_nodes *nodes)
static as_nodes * as_nodes_reserve(as_cluster *cluster)
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)
static void as_cluster_add_delay_queue_timeout(as_cluster *cluster)
static void as_cluster_add_retry(as_cluster *cluster)
as_status as_cluster_enable_metrics(as_error *err, as_cluster *cluster, as_metrics_policy *policy)
as_status as_cluster_create(as_config *config, as_error *err, as_cluster **cluster)
static uint64_t as_cluster_get_retry_count(const as_cluster *cluster)
AS_EXTERN void as_nodes_destroy(as_nodes *nodes)
static bool as_node_valid_error_rate(as_node *node)
void as_cluster_get_node_names(as_cluster *cluster, int *n_nodes, char **node_names)
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)
static void as_nodes_release(as_nodes *nodes)
static uint32_t as_node_get_error_rate(as_node *node)
as_status as_cluster_disable_metrics(as_error *err, as_cluster *cluster)
bool as_cluster_is_connected(as_cluster *cluster)
static void as_node_put_conn_error(as_node *node, as_socket *sock)
AS_EXTERN as_status as_cluster_reserve_all_nodes(as_cluster *cluster, as_error *err, as_nodes **nodes)
AS_EXTERN as_node * as_node_get_by_name(as_cluster *cluster, const char *name)
void(* as_release_fn)(void *value)
static void as_cluster_add_tran(as_cluster *cluster)
AS_EXTERN as_node * as_node_get_random(as_cluster *cluster)
static void as_node_reset_error_rate(as_node *node)
AS_EXTERN void as_cluster_add_seed(as_cluster *cluster, const char *hostname, const char *tls_name, uint16_t port)
static void as_node_close_connection(as_node *node, as_socket *sock, as_conn_pool *pool)
static void as_node_put_connection(as_node *node, as_socket *sock)
as_partition_tables partition_tables
uint32_t metrics_latency_shift
as_cluster_event_callback event_callback
bool fail_if_not_connected
uint32_t login_timeout_ms
bool use_services_alternate
uint64_t delay_queue_timeout_count
uint32_t async_min_conns_per_node
uint32_t metrics_interval
as_event_state * event_state
void * event_callback_udata
uint32_t min_conns_per_node
uint32_t conn_pools_per_node
as_thread_pool thread_pool
pthread_mutex_t seed_lock
uint64_t max_socket_idle_ns_trim
as_metrics_listeners metrics_listeners
pthread_mutex_t metrics_lock
pthread_mutex_t tend_lock
uint32_t error_rate_window
uint32_t max_conns_per_node
uint32_t invalid_node_count
uint32_t pipe_max_conns_per_node
struct as_shm_info_s * shm_info
uint32_t async_max_conns_per_node
uint64_t max_socket_idle_ns_tran
uint32_t metrics_latency_columns
struct as_cluster_s * cluster