Update serverpanic output based on 'extended-redis-compatibility' config. (#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>
This commit is contained in:
Shivshankar 2024-05-08 15:17:32 -04:00 committed by GitHub
parent 6af51f5092
commit 1125bdbb80
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 9 additions and 5 deletions

View File

@ -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,

View File

@ -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];
@ -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;

View File

@ -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;
@ -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;