• Nils Goroll's avatar
    Accurate ban statistics except for a few remaining corner cases · 6cbd0d9f
    Nils Goroll authored
    For ban statistics, we updated VSC_C_main directly, so if we raced
    Pool_Sumstat(), that could undo our changes.
    
    This patch fixes statistics by using the per-worker statistics
    cache except for the following remaining corner cases:
    
    * bans_persisted_* counters receive absolut updates, which does
      not seem to fit the incremental updates via the per-worker stats.
    
      I've kept these cases untouched and marked with comments. Worst
      that should happen here are temporary inconsistencies until the
      next absolute update.
    
    * For BAN_Reload(), my understanding is that it should only
      happen during init, so we continue to update VSC_C_main
      directly.
    
    * For bans via the cli, we would need to grab the wstat lock,
      which, at the moment, is private to the worker implementation.
    
      Until we make a change here, we could miss a ban increment
      from the cli.
    
    * for VCL bans from vcl_init / fini, we do not have access
      to the worker struct at the moment, so for now we also
      accept an inconsistency here.
    
    Fixes #2716 for relevant cases
    6cbd0d9f
Name
Last commit
Last update
..
compat Loading commit data...
tbl Loading commit data...
vapi Loading commit data...
Makefile.am Loading commit data...
binary_heap.h Loading commit data...
generate.py Loading commit data...
libvcc.h Loading commit data...
miniobj.h Loading commit data...
vas.h Loading commit data...
vav.h Loading commit data...
vbm.h Loading commit data...
vbm_test.c Loading commit data...
vcli.h Loading commit data...
vcli_serve.h Loading commit data...
vcs.h Loading commit data...
vct.h Loading commit data...
vcurses.h Loading commit data...
vdef.h Loading commit data...
vend.h Loading commit data...
vev.h Loading commit data...
vfil.h Loading commit data...
vfl.h Loading commit data...
vin.h Loading commit data...
vjsn.h Loading commit data...
vlu.h Loading commit data...
vmb.h Loading commit data...
vnum.h Loading commit data...
vpf.h Loading commit data...
vqueue.h Loading commit data...
vre.h Loading commit data...
vrnd.h Loading commit data...
vrt.h Loading commit data...
vsa.h Loading commit data...
vsb.h Loading commit data...
vsc_priv.h Loading commit data...
vsha256.h Loading commit data...
vsl_priv.h Loading commit data...
vsm_priv.h Loading commit data...
vss.h Loading commit data...
vsub.h Loading commit data...
vtcp.h Loading commit data...
vtim.h Loading commit data...
vtree.h Loading commit data...
vus.h Loading commit data...
vut.h Loading commit data...
vut_options.h Loading commit data...