unsigned int refcnt; /* number of local peer over all peers sections
attached to this table */
unsigned int current; /* number of sticky sessions currently in table */
- __decl_thread(HA_RWLOCK_T lock); /* lock related to the table */
-
THREAD_ALIGN(64);
struct eb_root updates; /* head of sticky updates sequence tree, uses updt_lock */
return;
}
- HA_RWLOCK_WRLOCK(STK_TABLE_LOCK, &t->lock);
-
while (!HA_ATOMIC_CAS(&t->shards[bucket].next_exp, &old_exp, new_exp)) {
if (new_exp == old_exp)
break;
new_exp = tick_first(expire, old_exp);
}
- HA_RWLOCK_WRUNLOCK(STK_TABLE_LOCK, &t->lock);
-
if (t->type == SMP_T_STR)
len = strlen((const char *)ts->key.key);
else
}
t->updates = EB_ROOT_UNIQUE;
- HA_RWLOCK_INIT(&t->lock);
t->pool = create_pool("sticktables", sizeof(struct stksess) + round_ptr_size(t->data_size) + t->key_size, MEM_F_SHARED);