The global shctx lookups and misses was updated without using atomic
ops, so the stats available in "show info" are very likely off by a few
units over time. This should be backported as far as 1.8. Versions
without _HA_ATOMIC_INC() can use HA_ATOMIC_ADD(,1).
SSL_SESSION *sess;
struct shared_block *first;
- global.shctx_lookups++;
+ _HA_ATOMIC_INC(&global.shctx_lookups);
/* allow the session to be freed automatically by openssl */
*do_copy = 0;
if (!sh_ssl_sess) {
/* no session found: unlock cache and exit */
shctx_unlock(ssl_shctx);
- global.shctx_misses++;
+ _HA_ATOMIC_INC(&global.shctx_misses);
return NULL;
}