Ref #2211
On a role mismatch, the reconnect in redis_check_conn() sleeps one
second, asks INFO again and sleeps once more: two seconds under
r->lock, which every Redis update holds before the ng reply (#1865).
After a failover, with --redis on the old master's address, every
update did this, and ng requests timed out.
Make one attempt, with no sleep. After a role failure, or a failure
that took --redis-reconnect-slow (100 ms) or more, skip Redis
operations on that connection for --redis-reconnect-pause (1000 ms),
through restore_tick_us as --redis-allowed-errors does. A quick failure
(connection refused) is retried at once, as before. As with a failed
attempt, a skipped operation is not written; skips are logged once per
pause. The startup connection keeps its eleven attempts.
Tested by auto-daemon-tests-redis-errors.pl.
Change-Id: Ia84288f1c6fe97c4317689fef75d0ff5fc9061f8
Ref #2211
Call updates (SET) and deletions (DEL) are pipelined, and
redis_consume() freed their replies unread: a write refused with
READONLY or NOREPLICAS, as during a Sentinel failover, left no trace in
rtpengine.
Check every reply. An error reply is counted in a new statistic,
rediswriteerrors, and logged at most once a second per connection; the
connection is kept, since a reconnect would get the same answer. A read
error or timeout on the replies drops the connection at once instead of
at the next PING. An encoding failure no longer drops the connection.
Tested by auto-daemon-tests-redis-errors.pl, with a new fake Redis
module, NGCP::Rtpengine::FakeRedis.
Change-Id: I4c49460d7894de0c5eaf5e5c27f5a6460e4115a7
Adds a new config section that allows adjusting behaviour for certain
transcoding scenarios. This only adds the initial support for the config
option.
Change-Id: Ia3d43061adc540fab054e5c99ab804dc1ff53b84
If keyspace notifications are used at all, the respective objects and
threads must be created during startup. This requires at least some
keyspace to be configured. To support usage without any keyspaces
initially (and add them during runtime), add a special case (set
keyspace to -1).
Convert all keyspace variables to signed ints. Ignore negative keyspace
numbers where appropriate. Support Redis endpoint addresses without
database number.
Fixes#1902
Change-Id: I45a3c87bc515f9b14e64ec1ec0906dde271b5f8d
Add support for simplified G.107 formula, with math changed to
fixed-point. Retain legacy formula as an option for backwards
compatibility.
Change-Id: I999fc7de7be1407876c201c251538cea72b04008