diff --git a/redis.conf b/redis.conf index 7635c14b4..0431c3742 100644 --- a/redis.conf +++ b/redis.conf @@ -1450,7 +1450,7 @@ appendfsync everysec # BGSAVE or BGREWRITEAOF is in progress. # # This means that while another child is saving, the durability of Redis is -# the same as "appendfsync none". In practical terms, this means that it is +# the same as "appendfsync no". In practical terms, this means that it is # possible to lose up to 30 seconds of log in the worst scenario (with the # default Linux settings). # diff --git a/src/functions.c b/src/functions.c index 463a07311..688d9f5c6 100644 --- a/src/functions.c +++ b/src/functions.c @@ -674,7 +674,7 @@ void fcallroCommand(client *c) { * * Engine name * * Library description * * Library code - * RDB_OPCODE_FUNCTION is saved before each library to present + * RDB_OPCODE_FUNCTION2 is saved before each library to present * that the payload is a library. * RDB version and crc64 is saved at the end of the payload. * The RDB version is saved for backward compatibility. diff --git a/src/listpack.c b/src/listpack.c index 75189f55f..2ef77131c 100644 --- a/src/listpack.c +++ b/src/listpack.c @@ -49,7 +49,6 @@ #define LP_HDR_NUMELE_UNKNOWN UINT16_MAX #define LP_MAX_INT_ENCODING_LEN 9 #define LP_MAX_BACKLEN_SIZE 5 -#define LP_MAX_ENTRY_BACKLEN 34359738367ULL #define LP_ENCODING_INT 0 #define LP_ENCODING_STRING 1 @@ -569,9 +568,7 @@ unsigned long lpLength(unsigned char *lp) { * this lib. * * Similarly, there is no error returned since the listpack normally can be - * assumed to be valid, so that would be a very high API cost. However a function - * in order to check the integrity of the listpack at load time is provided, - * check lpIsValid(). */ + * assumed to be valid, so that would be a very high API cost. */ static inline unsigned char *lpGetWithSize(unsigned char *p, int64_t *count, unsigned char *intbuf, uint64_t *entry_size) { int64_t val; uint64_t uval, negstart, negmax; diff --git a/src/rdb.c b/src/rdb.c index ddbdb8b1b..b53fbdb21 100644 --- a/src/rdb.c +++ b/src/rdb.c @@ -1160,7 +1160,6 @@ ssize_t rdbSaveAuxFieldStrInt(rio *rdb, char *key, long long val) { /* Save a few default AUX fields with information about the RDB generated. */ int rdbSaveInfoAuxFields(rio *rdb, int rdbflags, rdbSaveInfo *rsi) { - UNUSED(rdbflags); int redis_bits = (sizeof(void*) == 8) ? 64 : 32; int aof_base = (rdbflags & RDBFLAGS_AOF_PREAMBLE) != 0; @@ -3247,7 +3246,7 @@ eoferr: * to do the actual loading. Moreover the ETA displayed in the INFO * output is initialized and finalized. * - * If you pass an 'rsi' structure initialized with RDB_SAVE_OPTION_INIT, the + * If you pass an 'rsi' structure initialized with RDB_SAVE_INFO_INIT, the * loading code will fill the information fields in the structure. */ int rdbLoad(char *filename, rdbSaveInfo *rsi, int rdbflags) { FILE *fp; diff --git a/src/server.c b/src/server.c index 84d6adf86..2bc41b253 100644 --- a/src/server.c +++ b/src/server.c @@ -635,7 +635,7 @@ void resetChildState() { NULL); } -/* Return if child type is mutual exclusive with other fork children */ +/* Return if child type is mutually exclusive with other fork children */ int isMutuallyExclusiveChildType(int type) { return type == CHILD_TYPE_RDB || type == CHILD_TYPE_AOF || type == CHILD_TYPE_MODULE; } @@ -3594,8 +3594,8 @@ int commandCheckArity(client *c, sds *err) { * if C_ERR is returned the client was destroyed (i.e. after QUIT). */ int processCommand(client *c) { if (!scriptIsTimedout()) { - /* Both EXEC and EVAL call call() directly so there should be - * no way in_exec or in_eval is 1. + /* Both EXEC and scripts call call() directly so there should be + * no way in_exec or scriptIsRunning() is 1. * That is unless lua_timedout, in which case client may run * some commands. */ serverAssert(!server.in_exec); @@ -6366,7 +6366,7 @@ int redisFork(int purpose) { server.stat_fork_rate = (double) zmalloc_used_memory() * 1000000 / server.stat_fork_time / (1024*1024*1024); /* GB per second. */ latencyAddSampleIfNeeded("fork",server.stat_fork_time/1000); - /* The child_pid and child_type are only for mutual exclusive children. + /* The child_pid and child_type are only for mutually exclusive children. * other child types should handle and store their pid's in dedicated variables. * * Today, we allows CHILD_TYPE_LDB to run in parallel with the other fork types: @@ -6452,7 +6452,7 @@ void dismissClientMemory(client *c) { /* In the child process, we don't need some buffers anymore, and these are * likely to change in the parent when there's heavy write traffic. - * We dismis them right away, to avoid CoW. + * We dismiss them right away, to avoid CoW. * see dismissMemeory(). */ void dismissMemoryInChild(void) { /* madvise(MADV_DONTNEED) may not work if Transparent Huge Pages is enabled. */ diff --git a/src/server.h b/src/server.h index 007614c1d..f33eaa5ce 100644 --- a/src/server.h +++ b/src/server.h @@ -2194,7 +2194,7 @@ typedef int redisGetKeysProc(struct redisCommand *cmd, robj **argv, int argc, ge * * CMD_NO_MANDATORY_KEYS: This key arguments for this command are optional. * - * CMD_NO_MULTI: The command is nt allowed inside a transaction + * CMD_NO_MULTI: The command is not allowed inside a transaction * * The following additional flags are only used in order to put commands * in a specific ACL category. Commands can have multiple ACL categories. @@ -2244,7 +2244,6 @@ struct redisCommand { struct redisCommandArg *args; /* Runtime populated data */ - /* What keys should be loaded in background when calling this command? */ long long microseconds, calls, rejected_calls, failed_calls; int id; /* Command ID. This is a progressive ID starting from 0 that is assigned at runtime, and is used in order to check @@ -2610,7 +2609,6 @@ void decrRefCount(robj *o); void decrRefCountVoid(void *o); void incrRefCount(robj *o); robj *makeObjectShared(robj *o); -robj *resetRefCount(robj *obj); void freeStringObject(robj *o); void freeListObject(robj *o); void freeSetObject(robj *o); @@ -2755,7 +2753,7 @@ void sendChildInfo(childInfoType info_type, size_t keys, char *pname); void receiveChildInfo(void); /* Fork helpers */ -int redisFork(int type); +int redisFork(int purpose); int hasActiveChildProcess(); void resetChildState(); int isMutuallyExclusiveChildType(int type);