[OpenSIPS-Devel] [OpenSIPS/opensips] ec0092: ratelimit: keep only local values in pipe->counter...

Răzvan Crainea noreply at github.com
Tue Dec 22 08:58:37 EST 2020


  Branch: refs/heads/3.0
  Home:   https://github.com/OpenSIPS/opensips
  Commit: ec0092d1d99d3dfba73ca1c572c9edcb12e66023
      https://github.com/OpenSIPS/opensips/commit/ec0092d1d99d3dfba73ca1c572c9edcb12e66023
  Author: Razvan Crainea <razvan at opensips.org>
  Date:   2020-12-22 (Tue, 22 Dec 2020)

  Changed paths:
    M modules/ratelimit/ratelimit.c

  Log Message:
  -----------
  ratelimit: keep only local values in pipe->counter for SBT

Up until this commit, the SBT algorithm would keep in pipe->counter the
sum between its local value, as well as the values gathered from the
other servers in the cluster. This means that it would replicate the
other's counters as well, leading to a broken behavior.
This fix makes sure that the SBT algorithm only stores the local counter
in the pipe->counter field, therefore it will not replicate other's
counters.

(cherry picked from commit 9621cac2033308e1d386103a229702750ffb005b)





More information about the Devel mailing list