Skip to content

Commit

Permalink
Update serverpanic output based on 'extended-redis-compatibility' con…
Browse files Browse the repository at this point in the history
…fig. (#415)

Updated serverPanic output in db.c based on the
extended-redis-compatibility config. and also updated comments in other
files.

---------

Signed-off-by: Shivshankar-Reddy <shiva.sheri.github@gmail.com>
  • Loading branch information
Shivshankar-Reddy committed May 8, 2024
1 parent 6af51f5 commit 1125bdb
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/acl.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ user *DefaultUser; /* Global reference to the default user.
different user. */

list *UsersToLoad; /* This is a list of users found in the configuration file
that we'll need to load in the final stage of Redis
that we'll need to load in the final stage of the server
initialization, after all the modules are already
loaded. Every list element is a NULL terminated
array of SDS pointers: the first is the user name,
Expand Down
4 changes: 2 additions & 2 deletions src/crccombine.c
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ static void gf2_matrix_square(uint64_t *square, uint64_t *mat, uint8_t dim) {
square[n] = CRC_MULTIPLY(mat, mat[n]);
}

/* Turns out our Redis / Jones CRC cycles at this point, so we can support
/* Turns out our Jones CRC cycles at this point, so we can support
* more than 64 bits of extension if we want. Trivially. */
static uint64_t combine_cache[64][64];

Expand Down Expand Up @@ -204,7 +204,7 @@ void init_combine_cache(uint64_t poly, uint8_t dim) {
gf2_matrix_square(combine_cache[1], combine_cache[0], dim);

/* do/while to overwrite the first two layers, they are not used, but are
* re-generated in the last two layers for the Redis polynomial */
* re-generated in the last two layers for the crc polynomial */
do {
gf2_matrix_square(combine_cache[cache_num], combine_cache[cache_num + prev], dim);
prev = -1;
Expand Down
8 changes: 6 additions & 2 deletions src/db.c
Original file line number Diff line number Diff line change
Expand Up @@ -2083,7 +2083,9 @@ int getKeysUsingKeySpecs(struct serverCommand *cmd, robj **argv, int argc, int s
if (cmd->flags & CMD_MODULE || cmd->arity < 0) {
continue;
} else {
serverPanic("Redis built-in command declared keys positions not matching the arity requirements.");
serverPanic("%s built-in command declared keys positions"
" not matching the arity requirements.",
server.extended_redis_compat ? "Redis" : "Valkey");
}
}
keys[result->numkeys].pos = i;
Expand Down Expand Up @@ -2276,7 +2278,9 @@ int getKeysUsingLegacyRangeSpec(struct serverCommand *cmd, robj **argv, int argc
result->numkeys = 0;
return 0;
} else {
serverPanic("Redis built-in command declared keys positions not matching the arity requirements.");
serverPanic("%s built-in command declared keys positions"
" not matching the arity requirements.",
server.extended_redis_compat ? "Redis" : "Valkey");
}
}
keys[i].pos = j;
Expand Down

0 comments on commit 1125bdb

Please sign in to comment.