summaryrefslogtreecommitdiff
path: root/src/networking.c
diff options
context:
space:
mode:
authorOran Agra <oran@redislabs.com>2022-02-21 11:20:41 +0200
committerGitHub <noreply@github.com>2022-02-21 11:20:41 +0200
commitfad0b0d2a680498fce1cd7e153f8ad7396a79edf (patch)
tree181fc209c0f8c52dec51375bb80c7a3cd9e8403a /src/networking.c
parentb59bb9b476cbcc9ed321dc5172be3ba2e0738142 (diff)
downloadredis-fad0b0d2a680498fce1cd7e153f8ad7396a79edf.tar.gz
Fix error stats and failed command stats for blocked clients (#10309)
This is a followup work for #10278, and a discussion about #10279 The changes: - fix failed_calls in command stats for blocked clients that got error. including CLIENT UNBLOCK, and module replying an error from a thread. - fix latency stats for XREADGROUP that filed with -NOGROUP Theory behind which errors should be counted: - error stats represents errors returned to the user, so an error handled by a module should not be counted. - total error counter should be the same. - command stats represents execution of commands (even with RM_Call, and if they fail or get rejected it counts these calls in commandstats, so it should also count failed_calls) Some thoughts about Scripts: for scripts it could be different since they're part of user code, not the infra (not an extension to redis) we certainly want commandstats to contain all calls and errors a simple script is like mult-exec transaction so an error inside it should be counted in error stats a script that replies with an error to the user (using redis.error_reply) should also be counted in error stats but then the problem is that a plain `return redis.call("SET")` should not be counted twice (once for the SET and once for EVAL) so that's something left to be resolved in #10279
Diffstat (limited to 'src/networking.c')
-rw-r--r--src/networking.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/networking.c b/src/networking.c
index 0ae0f6eb9..8a89a88cd 100644
--- a/src/networking.c
+++ b/src/networking.c
@@ -2956,6 +2956,7 @@ NULL
else
replyToBlockedClientTimedOut(target);
unblockClient(target);
+ updateStatsOnUnblock(target, 0, 0, 1);
addReply(c,shared.cone);
} else {
addReply(c,shared.czero);