diff --git a/deps/Makefile b/deps/Makefile index 3bf0363d5..67b7d4102 100644 --- a/deps/Makefile +++ b/deps/Makefile @@ -1,4 +1,4 @@ -# Redis dependency Makefile +# Dependency Makefile uname_S:= $(shell sh -c 'uname -s 2>/dev/null || echo not') diff --git a/src/acl.c b/src/acl.c index f0668a4ec..d9577b212 100644 --- a/src/acl.c +++ b/src/acl.c @@ -168,7 +168,7 @@ typedef struct { * execute this command. * * If the bit for a given command is NOT set and the command has - * allowed first-args, Redis will also check allowed_firstargs in order to + * allowed first-args, the server will also check allowed_firstargs in order to * understand if the command can be executed. */ uint64_t allowed_commands[USER_COMMAND_BITS_COUNT/64]; /* allowed_firstargs is used by ACL rules to block access to a command unless a @@ -502,7 +502,7 @@ void ACLFreeUserAndKillClients(user *u) { if (c->user == u) { /* We'll free the connection asynchronously, so * in theory to set a different user is not needed. - * However if there are bugs in Redis, soon or later + * However if there are bugs in the server, soon or later * this may result in some security hole: it's much * more defensive to set the default user and put * it in non authenticated mode. */ @@ -1023,7 +1023,7 @@ cleanup: * +@ Allow the execution of all the commands in such category * with valid categories are like @admin, @set, @sortedset, ... * and so forth, see the full list in the server.c file where - * the Redis command table is described and defined. + * the command table is described and defined. * The special category @all means all the commands, but currently * present in the server, and that will be loaded in the future * via modules. @@ -3204,7 +3204,7 @@ void addReplyCommandCategories(client *c, struct serverCommand *cmd) { } /* AUTH - * AUTH (Redis >= 6.0 form) + * AUTH (Redis OSS >= 6.0 form) * * When the user is omitted it means that we are trying to authenticate * against the default user. */ diff --git a/src/ae.c b/src/ae.c index 839d23b51..cc67f2580 100644 --- a/src/ae.c +++ b/src/ae.c @@ -258,7 +258,7 @@ int aeDeleteTimeEvent(aeEventLoop *eventLoop, long long id) * If there are no timers, -1 is returned. * * Note that's O(N) since time events are unsorted. - * Possible optimizations (not needed by Redis so far, but...): + * Possible optimizations (not needed so far, but...): * 1) Insert the event in order, so that the nearest is just the head. * Much better but still insertion or deletion of timers is O(N). * 2) Use a skiplist to have this operation as O(1) and insertion as O(log(N)). diff --git a/src/anet.c b/src/anet.c index e4f9ecf37..0a05fb562 100644 --- a/src/anet.c +++ b/src/anet.c @@ -372,7 +372,7 @@ int anetResolve(char *err, char *host, char *ipbuf, size_t ipbuf_len, static int anetSetReuseAddr(char *err, int fd) { int yes = 1; - /* Make sure connection-intensive things like the redis benchmark + /* Make sure connection-intensive things like the benchmark tool * will be able to close/open sockets a zillion of times */ if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &yes, sizeof(yes)) == -1) { anetSetError(err, "setsockopt SO_REUSEADDR: %s", strerror(errno)); @@ -388,7 +388,7 @@ static int anetCreateSocket(char *err, int domain) { return ANET_ERR; } - /* Make sure connection-intensive things like the redis benchmark + /* Make sure connection-intensive things like the benchmark tool * will be able to close/open sockets a zillion of times */ if (anetSetReuseAddr(err,s) == ANET_ERR) { close(s); diff --git a/src/aof.c b/src/aof.c index ab24770b9..a6a89c931 100644 --- a/src/aof.c +++ b/src/aof.c @@ -59,11 +59,11 @@ void aof_background_fsync_and_close(int fd); * * Append-only files consist of three types: * - * BASE: Represents a Redis snapshot from the time of last AOF rewrite. The manifest + * BASE: Represents a server snapshot from the time of last AOF rewrite. The manifest * file contains at most a single BASE file, which will always be the first file in the * list. * - * INCR: Represents all write commands executed by Redis following the last successful + * INCR: Represents all write commands executed by the server following the last successful * AOF rewrite. In some cases it is possible to have several ordered INCR files. For * example: * - During an on-going AOF rewrite @@ -119,7 +119,7 @@ aofInfo *aofInfoDup(aofInfo *orig) { /* Format aofInfo as a string and it will be a line in the manifest. * - * When update this format, make sure to update redis-check-aof as well. */ + * When update this format, make sure to update valkey-check-aof as well. */ sds aofInfoFormat(sds buf, aofInfo *ai) { sds filename_repr = NULL; @@ -222,10 +222,10 @@ sds getAofManifestAsString(aofManifest *am) { } /* Load the manifest information from the disk to `server.aof_manifest` - * when the Redis server start. + * when the server starts. * * During loading, this function does strict error checking and will abort - * the entire Redis server process on error (I/O error, invalid format, etc.) + * the entire server process on error (I/O error, invalid format, etc.) * * If the AOF directory or manifest file do not exist, this will be ignored * in order to support seamless upgrades from previous versions which did not @@ -253,7 +253,7 @@ void aofLoadManifestFromDisk(void) { sdsfree(am_filepath); } -/* Generic manifest loading function, used in `aofLoadManifestFromDisk` and redis-check-aof tool. */ +/* Generic manifest loading function, used in `aofLoadManifestFromDisk` and valkey-check-aof tool. */ #define MANIFEST_MAX_LINE 1024 aofManifest *aofLoadManifestFromFile(sds am_filepath) { const char *err = NULL; @@ -609,7 +609,7 @@ int persistAofManifest(aofManifest *am) { return ret; } -/* Called in `loadAppendOnlyFiles` when we upgrade from a old version redis. +/* Called in `loadAppendOnlyFiles` when we upgrade from a old version of the server. * * 1) Create AOF directory use 'server.aof_dirname' as the name. * 2) Use 'server.aof_filename' to construct a BASE type aofInfo and add it to @@ -617,7 +617,7 @@ int persistAofManifest(aofManifest *am) { * 3) Move the old AOF file (server.aof_filename) to AOF directory. * * If any of the above steps fails or crash occurs, this will not cause any - * problems, and redis will retry the upgrade process when it restarts. + * problems, and the server will retry the upgrade process when it restarts. */ void aofUpgradePrepare(aofManifest *am) { serverAssert(!aofFileExist(server.aof_filename)); @@ -704,13 +704,13 @@ void aofDelTempIncrAofFile(void) { return; } -/* Called after `loadDataFromDisk` when redis start. If `server.aof_state` is +/* Called after `loadDataFromDisk` when the server starts. If `server.aof_state` is * 'AOF_ON', It will do three things: - * 1. Force create a BASE file when redis starts with an empty dataset + * 1. Force create a BASE file when the server starts with an empty dataset * 2. Open the last opened INCR type AOF for writing, If not, create a new one * 3. Synchronously update the manifest file to the disk * - * If any of the above steps fails, the redis process will exit. + * If any of the above steps fails, the server process will exit. */ void aofOpenIfNeededOnServerStart(void) { if (server.aof_state != AOF_ON) { @@ -856,7 +856,7 @@ cleanup: /* Whether to limit the execution of Background AOF rewrite. * - * At present, if AOFRW fails, redis will automatically retry. If it continues + * At present, if AOFRW fails, the server will automatically retry. If it continues * to fail, we may get a lot of very small INCR files. so we need an AOFRW * limiting measure. * @@ -1371,7 +1371,7 @@ void feedAppendOnlyFile(int dictid, robj **argv, int argc) { * AOF loading * ------------------------------------------------------------------------- */ -/* In Redis commands are always executed in the context of a client, so in +/* Commands are always executed in the context of a client, so in * order to load the append only file we need to create a fake client. */ struct client *createAOFClient(void) { struct client *c = createClient(NULL); @@ -1390,7 +1390,7 @@ struct client *createAOFClient(void) { c->flags = CLIENT_DENY_BLOCKING; /* We set the fake client as a slave waiting for the synchronization - * so that Redis will not try to send replies to this client. */ + * so that the server will not try to send replies to this client. */ c->replstate = SLAVE_STATE_WAIT_BGSAVE_START; return c; } @@ -1664,7 +1664,7 @@ int loadAppendOnlyFiles(aofManifest *am) { int total_num, aof_num = 0, last_file; /* If the 'server.aof_filename' file exists in dir, we may be starting - * from an old redis version. We will use enter upgrade mode in three situations. + * from an old server version. We will use enter upgrade mode in three situations. * * 1. If the 'server.aof_dirname' directory not exist * 2. If the 'server.aof_dirname' directory exists but the manifest file is missing @@ -1954,7 +1954,7 @@ int rewriteSortedSetObject(rio *r, robj *key, robj *o) { } /* Write either the key or the value of the currently selected item of a hash. - * The 'hi' argument passes a valid Redis hash iterator. + * The 'hi' argument passes a valid hash iterator. * The 'what' filed specifies if to write a key or a value and can be * either OBJ_HASH_KEY or OBJ_HASH_VALUE. * @@ -2208,7 +2208,7 @@ int rewriteStreamObject(rio *r, robj *key, robj *o) { } /* Call the module type callback in order to rewrite a data type - * that is exported by a module and is not handled by Redis itself. + * that is exported by a module and is not handled by the server itself. * The function returns 0 on error, 1 on success. */ int rewriteModuleObject(rio *r, robj *key, robj *o, int dbid) { ValkeyModuleIO io; @@ -2347,7 +2347,7 @@ werr: * "filename". Used both by REWRITEAOF and BGREWRITEAOF. * * In order to minimize the number of commands needed in the rewritten - * log Redis uses variadic commands when possible, such as RPUSH, SADD + * log, the server uses variadic commands when possible, such as RPUSH, SADD * and ZADD. However at max AOF_REWRITE_ITEMS_PER_CMD items per time * are inserted using a single command. */ int rewriteAppendOnlyFile(char *filename) { @@ -2419,7 +2419,7 @@ werr: /* This is how rewriting of the append only file in background works: * * 1) The user calls BGREWRITEAOF - * 2) Redis calls this function, that forks(): + * 2) The server calls this function, that forks(): * 2a) the child rewrite the append only file in a temp file. * 2b) the parent open a new INCR AOF file to continue writing. * 3) When the child finished '2a' exists. diff --git a/src/atomicvar.h b/src/atomicvar.h index b506c5d29..17d1c15a6 100644 --- a/src/atomicvar.h +++ b/src/atomicvar.h @@ -83,13 +83,13 @@ /* Define serverAtomic for atomic variable. */ #define serverAtomic -/* To test Redis with Helgrind (a Valgrind tool) it is useful to define +/* To test the server with Helgrind (a Valgrind tool) it is useful to define * the following macro, so that __sync macros are used: those can be detected * by Helgrind (even if they are less efficient) so that no false positive * is reported. */ // #define __ATOMIC_VAR_FORCE_SYNC_MACROS -/* There will be many false positives if we test Redis with Helgrind, since +/* There will be many false positives if we test the server with Helgrind, since * Helgrind can't understand we have imposed ordering on the program, so * we use macros in helgrind.h to tell Helgrind inter-thread happens-before * relationship explicitly for avoiding false positives. diff --git a/src/bio.c b/src/bio.c index da6222242..c6b4d77c0 100644 --- a/src/bio.c +++ b/src/bio.c @@ -1,4 +1,4 @@ -/* Background I/O service for Redis. +/* Background I/O service for the server. * * This file implements operations that we need to perform in the background. * Currently there is only a single operation, that is a background close(2) @@ -8,7 +8,7 @@ * * In the future we'll either continue implementing new things we need or * we'll switch to libeio. However there are probably long term uses for this - * file as we may want to put here Redis specific background tasks (for instance + * file as we may want to put here server specific background tasks (for instance * it is not impossible that we'll need a non blocking FLUSHDB/FLUSHALL * implementation). * @@ -323,7 +323,7 @@ void bioDrainWorker(int job_type) { /* Kill the running bio threads in an unclean way. This function should be * used only when it's critical to stop the threads for some reason. - * Currently Redis does this only on crash (for instance on SIGSEGV) in order + * Currently the server does this only on crash (for instance on SIGSEGV) in order * to perform a fast memory check without other threads messing with memory. */ void bioKillThreads(void) { int err; diff --git a/src/bitops.c b/src/bitops.c index 5b97c033a..611ab931b 100644 --- a/src/bitops.c +++ b/src/bitops.c @@ -406,7 +406,7 @@ void printBits(unsigned char *p, unsigned long count) { /* This helper function used by GETBIT / SETBIT parses the bit offset argument * making sure an error is returned if it is negative or if it overflows - * Redis 512 MB limit for the string value or more (server.proto_max_bulk_len). + * the server's 512 MB limit for the string value or more (server.proto_max_bulk_len). * * If the 'hash' argument is true, and 'bits is positive, then the command * will also parse bit offsets prefixed by "#". In such a case the offset @@ -443,7 +443,7 @@ int getBitOffsetFromArgument(client *c, robj *o, uint64_t *offset, int hash, int /* This helper function for BITFIELD parses a bitfield type in the form * where sign is 'u' or 'i' for unsigned and signed, and * the bits is a value between 1 and 64. However 64 bits unsigned integers - * are reported as an error because of current limitations of Redis protocol + * are reported as an error because of current limitations of RESP * to return unsigned integer values greater than INT64_MAX. * * On error C_ERR is returned and an error is sent to the client. */ diff --git a/src/blocked.c b/src/blocked.c index aeac10670..ad815a9b6 100644 --- a/src/blocked.c +++ b/src/blocked.c @@ -292,7 +292,7 @@ void disconnectAllBlockedClients(void) { } } -/* This function should be called by Redis every time a single command, +/* This function should be called by the server every time a single command, * a MULTI/EXEC block, or a Lua script, terminated its execution after * being called by a client. It handles serving clients blocked in all scenarios * where a specific key access requires to block until that key is available. @@ -310,7 +310,7 @@ void disconnectAllBlockedClients(void) { * do client side, indeed!). Because mismatching clients (blocking for * a different type compared to the current key type) are moved in the * other side of the linked list. However as long as the key starts to - * be used only for a single type, like virtually any Redis application will + * be used only for a single type, like virtually any application will * do, the function is already fair. */ void handleClientsBlockedOnKeys(void) { diff --git a/src/call_reply.c b/src/call_reply.c index 0afaf4469..9e910f50c 100644 --- a/src/call_reply.c +++ b/src/call_reply.c @@ -525,7 +525,7 @@ list *callReplyDeferredErrorList(CallReply *rep) { * callReplyGetPrivateData(). * * NOTE: The parser used for parsing the reply and producing CallReply is - * designed to handle valid replies created by Redis itself. IT IS NOT + * designed to handle valid replies created by the server itself. IT IS NOT * DESIGNED TO HANDLE USER INPUT and using it to parse invalid replies is * unsafe. */ diff --git a/src/cli_commands.h b/src/cli_commands.h index 4642272eb..5669d2cf4 100644 --- a/src/cli_commands.h +++ b/src/cli_commands.h @@ -1,6 +1,6 @@ -/* This file is used by redis-cli in place of server.h when including commands.c +/* This file is used by valkey-cli in place of server.h when including commands.c * It contains alternative structs which omit the parts of the commands table - * that are not suitable for redis-cli, e.g. the command proc. */ + * that are not suitable for valkey-cli, e.g. the command proc. */ #ifndef VALKEY_CLI_COMMANDS_H #define VALKEY_CLI_COMMANDS_H diff --git a/src/cluster.c b/src/cluster.c index ca002a17b..99c02cd86 100644 --- a/src/cluster.c +++ b/src/cluster.c @@ -30,7 +30,7 @@ /* * cluster.c contains the common parts of a clustering * implementation, the parts that are shared between - * any implementation of Redis clustering. + * any implementation of clustering. */ #include "server.h" @@ -142,7 +142,7 @@ void createDumpPayload(rio *payload, robj *o, robj *key, int dbid) { payload->io.buffer.ptr = sdscatlen(payload->io.buffer.ptr,&crc,8); } -/* Verify that the RDB version of the dump payload matches the one of this Redis +/* Verify that the RDB version of the dump payload matches the one of this * instance and that the checksum is ok. * If the DUMP payload looks valid C_OK is returned, otherwise C_ERR * is returned. If rdbver_ptr is not NULL, its populated with the value read @@ -173,7 +173,7 @@ int verifyDumpPayload(unsigned char *p, size_t len, uint16_t *rdbver_ptr) { } /* DUMP keyname - * DUMP is actually not used by Redis Cluster but it is the obvious + * DUMP is actually not used by Cluster but it is the obvious * complement of RESTORE and can be useful for different applications. */ void dumpCommand(client *c) { robj *o; @@ -687,7 +687,7 @@ void migrateCommand(client *c) { if (!copy) { /* Translate MIGRATE as DEL for replication/AOF. Note that we do * this only for the keys for which we received an acknowledgement - * from the receiving Redis server, by using the del_idx index. */ + * from the receiving server, by using the del_idx index. */ if (del_idx > 1) { newargv[0] = createStringObject("DEL",3); /* Note that the following call takes ownership of newargv. */ @@ -1007,7 +1007,7 @@ clusterNode *getNodeByQuery(client *c, struct serverCommand *cmd, robj **argv, i /* Set error code optimistically for the base case. */ if (error_code) *error_code = CLUSTER_REDIR_NONE; - /* Modules can turn off Redis Cluster redirection: this is useful + /* Modules can turn off Cluster redirection: this is useful * when writing a module that implements a completely different * distributed system. */ @@ -1446,7 +1446,7 @@ void clusterCommandSlots(client * c) { /* The ASKING command is required after a -ASK redirection. * The client should issue ASKING before to actually send the command to - * the target instance. See the Redis Cluster specification for more + * the target instance. See the Cluster specification for more * information. */ void askingCommand(client *c) { if (server.cluster_enabled == 0) { diff --git a/src/cluster.h b/src/cluster.h index 463b4940d..a7211615d 100644 --- a/src/cluster.h +++ b/src/cluster.h @@ -2,7 +2,7 @@ #define __CLUSTER_H /*----------------------------------------------------------------------------- - * Redis cluster exported API. + * Cluster exported API. *----------------------------------------------------------------------------*/ #define CLUSTER_SLOT_MASK_BITS 14 /* Number of bits used for slot id. */ @@ -25,9 +25,9 @@ typedef struct _clusterNode clusterNode; struct clusterState; -/* Flags that a module can set in order to prevent certain Redis Cluster +/* Flags that a module can set in order to prevent certain Cluster * features to be enabled. Useful when implementing a different distributed - * system on top of Redis Cluster message bus, using modules. */ + * system on top of Cluster message bus, using modules. */ #define CLUSTER_MODULE_FLAG_NONE 0 #define CLUSTER_MODULE_FLAG_NO_FAILOVER (1<<1) #define CLUSTER_MODULE_FLAG_NO_REDIRECTION (1<<2) diff --git a/src/cluster_legacy.c b/src/cluster_legacy.c index 3e2850b17..01c531aaa 100644 --- a/src/cluster_legacy.c +++ b/src/cluster_legacy.c @@ -29,7 +29,7 @@ /* * cluster_legacy.c contains the implementation of the cluster API that is - * specific to the standard, Redis cluster-bus based clustering mechanism. + * specific to the standard, cluster-bus based clustering mechanism. */ #include "server.h" @@ -169,7 +169,7 @@ dictType clusterSdsToListType = { NULL /* allow to expand */ }; -/* Aux fields are introduced in Redis 7.2 to support the persistence +/* Aux fields were introduced in Redis OSS 7.2 to support the persistence * of various important node properties, such as shard id, in nodes.conf. * Aux fields take an explicit format of name=value pairs and have no * intrinsic order among them. Aux fields are always grouped together @@ -349,7 +349,7 @@ int clusterLoadConfig(char *filename) { /* Parse the file. Note that single lines of the cluster config file can * be really long as they include all the hash slots of the node. - * This means in the worst possible case, half of the Redis slots will be + * This means in the worst possible case, half of the slots will be * present in a single line, possibly in importing or migrating state, so * together with the node ID of the sender/receiver. * @@ -372,7 +372,7 @@ int clusterLoadConfig(char *filename) { if (argv == NULL) goto fmterr; /* Handle the special "vars" line. Don't pretend it is the last - * line even if it actually is when generated by Redis. */ + * line even if it actually is when generated by the server. */ if (strcasecmp(argv[0],"vars") == 0) { if (!(argc % 2)) goto fmterr; for (j = 1; j < argc; j += 2) { @@ -583,7 +583,7 @@ int clusterLoadConfig(char *filename) { } else if (auxFieldHandlers[af_shard_id].isPresent(n) == 0) { /* n is a primary but it does not have a persisted shard_id. * This happens if we are loading a nodes.conf generated by - * an older version of Redis. We should manually update the + * an older version of the server. We should manually update the * shard membership in this case */ clusterAddNodeToShard(n->shard_id, n); } @@ -1591,7 +1591,7 @@ clusterNode *clusterLookupNode(const char *name, int length) { * Note that the list returned is not computed on the fly * via slaveof; rather, it is maintained permanently to * track the shard membership and its life cycle is tied - * to this Redis process. Therefore, the caller must not + * to this process. Therefore, the caller must not * release the list. */ list *clusterGetNodesInMyShard(clusterNode *node) { sds s = sdsnewlen(node->shard_id, CLUSTER_NAMELEN); @@ -1685,7 +1685,7 @@ uint64_t clusterGetMaxEpoch(void) { * * Important note: this function violates the principle that config epochs * should be generated with consensus and should be unique across the cluster. - * However Redis Cluster uses this auto-generated new config epochs in two + * However the cluster uses this auto-generated new config epochs in two * cases: * * 1) When slots are closed after importing. Otherwise resharding would be @@ -1694,7 +1694,7 @@ uint64_t clusterGetMaxEpoch(void) { * failover its master even if there is not master majority able to * create a new configuration epoch. * - * Redis Cluster will not explode using this function, even in the case of + * The cluster will not explode using this function, even in the case of * a collision between this node and another node, generating the same * configuration epoch unilaterally, because the config epoch conflict * resolution algorithm will eventually move colliding nodes to different @@ -1795,7 +1795,7 @@ void clusterHandleConfigEpochCollision(clusterNode *sender) { * about the node we want to remove, we don't re-add it before some time. * * Currently the CLUSTER_BLACKLIST_TTL is set to 1 minute, this means - * that redis-cli has 60 seconds to send CLUSTER FORGET messages to nodes + * that valkey-cli has 60 seconds to send CLUSTER FORGET messages to nodes * in the cluster without dealing with the problem of other nodes re-adding * back the node to nodes we already sent the FORGET command to. * @@ -2361,7 +2361,7 @@ void clusterUpdateSlotsConfigWith(clusterNode *sender, uint64_t senderConfigEpoc } /* The slot is in importing state, it should be modified only - * manually via redis-cli (example: a resharding is in progress + * manually via valkey-cli (example: a resharding is in progress * and the migrating side slot was already closed and is advertising * a new config. We still want the slot to be closed manually). */ if (server.cluster->importing_slots_from[j]) continue; @@ -2406,7 +2406,7 @@ void clusterUpdateSlotsConfigWith(clusterNode *sender, uint64_t senderConfigEpoc } /* After updating the slots configuration, don't do any actual change - * in the state of the server if a module disabled Redis Cluster + * in the state of the server if a module disabled Cluster * keys redirections. */ if (server.cluster_module_flags & CLUSTER_MODULE_FLAG_NO_REDIRECTION) return; @@ -3732,7 +3732,7 @@ void clusterSendPing(clusterLink *link, int type) { /* Send a PONG packet to every connected node that's not in handshake state * and for which we have a valid link. * - * In Redis Cluster pongs are not used just for failure detection, but also + * In Cluster mode, pongs are not used just for failure detection, but also * to carry important configuration information. So broadcasting a pong is * useful when something changes in the configuration and we want to make * the cluster aware ASAP (for instance after a slave promotion). @@ -3971,7 +3971,7 @@ void clusterSendFailoverAuthIfNeeded(clusterNode *node, clusterMsg *request) { int j; /* IF we are not a master serving at least 1 slot, we don't have the - * right to vote, as the cluster size in Redis Cluster is the number + * right to vote, as the cluster size is the number * of masters serving at least one slot, and quorum is the cluster * size + 1 */ if (nodeIsSlave(myself) || myself->numslots == 0) return; @@ -5155,7 +5155,7 @@ void clusterUpdateState(void) { * B) If according to our config other nodes are already in charge for * this slots, we set the slots as IMPORTING from our point of view * in order to justify we have those slots, and in order to make - * redis-cli aware of the issue, so that it can try to fix it. + * valkey-cli aware of the issue, so that it can try to fix it. * 2) If we find data in a DB different than DB0 we return C_ERR to * signal the caller it should quit the server with an error message * or take other actions. diff --git a/src/cluster_legacy.h b/src/cluster_legacy.h index fc2ba80d1..9caf07bae 100644 --- a/src/cluster_legacy.h +++ b/src/cluster_legacy.h @@ -68,7 +68,7 @@ typedef struct clusterNodeFailReport { mstime_t time; /* Time of the last report from this node. */ } clusterNodeFailReport; -/* Redis cluster messages header */ +/* Cluster messages header */ /* Message types. * @@ -206,7 +206,7 @@ union clusterMsgData { #define CLUSTER_PROTO_VER 1 /* Cluster bus protocol version. */ typedef struct { - char sig[4]; /* Signature "RCmb" (Redis Cluster message bus). */ + char sig[4]; /* Signature "RCmb" (Cluster message bus). */ uint32_t totlen; /* Total length of this message */ uint16_t ver; /* Protocol version, currently set to 1. */ uint16_t port; /* Primary port number (TCP or TLS). */ @@ -233,8 +233,8 @@ typedef struct { union clusterMsgData data; } clusterMsg; -/* clusterMsg defines the gossip wire protocol exchanged among Redis cluster - * members, which can be running different versions of redis-server bits, +/* clusterMsg defines the gossip wire protocol exchanged among cluster + * members, which can be running different versions of server bits, * especially during cluster rolling upgrades. * * Therefore, fields in this struct should remain at the same offset from diff --git a/src/commands.def b/src/commands.def index 7007568b6..bd6ed3815 100644 --- a/src/commands.def +++ b/src/commands.def @@ -3,7 +3,7 @@ /* We have fabulous commands from * the fantastic - * Redis Command Table! */ + * Command Table! */ /* Must match serverCommandGroup */ const char *COMMAND_GROUP_STR[] = { diff --git a/src/config.c b/src/config.c index 6b7d22969..588a35cf8 100644 --- a/src/config.c +++ b/src/config.c @@ -1919,7 +1919,7 @@ static int sdsConfigSet(standardConfig *config, sds *argv, int argc, const char /* if prev and new configuration are not equal, set the new one */ if (new != prev && (new == NULL || prev == NULL || sdscmp(prev, new))) { /* If MODULE_CONFIG flag is set, then free temporary prev getModuleStringConfig returned. - * Otherwise, free the actual previous config value Redis held (Same action, different reasons) */ + * Otherwise, free the actual previous config value the server held (Same action, different reasons) */ sdsfree(prev); if (config->flags & MODULE_CONFIG) { @@ -2585,7 +2585,7 @@ int updateRequirePass(const char **err) { /* The old "requirepass" directive just translates to setting * a password to the default user. The only thing we do * additionally is to remember the cleartext password in this - * case, for backward compatibility with Redis <= 5. */ + * case, for backward compatibility. */ ACLUpdateDefaultUserPassword(server.requirepass); return 1; } diff --git a/src/config.h b/src/config.h index 9e2db5ac6..e550da00f 100644 --- a/src/config.h +++ b/src/config.h @@ -225,7 +225,7 @@ void setproctitle(const char *fmt, ...); /* Sometimes after including an OS-specific header that defines the * endianness we end with __BYTE_ORDER but not with BYTE_ORDER that is what - * the Redis code uses. In this case let's define everything without the + * the server code uses. In this case let's define everything without the * underscores. */ #ifndef BYTE_ORDER #ifdef __BYTE_ORDER diff --git a/src/connection.h b/src/connection.h index ac4821423..f50cd89d1 100644 --- a/src/connection.h +++ b/src/connection.h @@ -290,7 +290,7 @@ static inline int connAddr(connection *conn, char *ip, size_t ip_len, int *port, /* Format an IP,port pair into something easy to parse. If IP is IPv6 * (matches for ":"), the ip is surrounded by []. IP and port are just - * separated by colons. This the standard to display addresses within Redis. */ + * separated by colons. This the standard to display addresses within the server. */ static inline int formatAddr(char *buf, size_t buf_len, char *ip, int port) { return snprintf(buf, buf_len, strchr(ip,':') ? "[%s]:%d" : "%s:%d", ip, port); @@ -378,10 +378,10 @@ static inline sds connGetPeerCert(connection *conn) { return NULL; } -/* Initialize the redis connection framework */ +/* Initialize the connection framework */ int connTypeInitialize(void); -/* Register a connection type into redis connection framework */ +/* Register a connection type into the connection framework */ int connTypeRegister(ConnectionType *ct); /* Lookup a connection type by type name */ diff --git a/src/crc16_slottable.h b/src/crc16_slottable.h index f25e2412e..84e2aa028 100644 --- a/src/crc16_slottable.h +++ b/src/crc16_slottable.h @@ -1,11 +1,11 @@ #ifndef _CRC16_TABLE_H__ #define _CRC16_TABLE_H__ -/* A table of the shortest possible alphanumeric string that is mapped by redis' crc16 - * to any given redis cluster slot. +/* A table of the shortest possible alphanumeric string that is mapped by crc16 + * to any given cluster slot. * * The array indexes are slot numbers, so that given a desired slot, this string is guaranteed - * to make redis cluster route a request to the shard holding this slot + * to make the cluster route a request to the shard holding this slot */ typedef char crc16_alphastring[4]; diff --git a/src/db.c b/src/db.c index 886f27c0b..17e74f588 100644 --- a/src/db.c +++ b/src/db.c @@ -343,7 +343,7 @@ void setKey(client *c, serverDb *db, robj *key, robj *val, int flags) { if (!(flags & SETKEY_NO_SIGNAL)) signalModifiedKey(c,db,key); } -/* Return a random key, in form of a Redis object. +/* Return a random key, in form of an Object. * If there are no keys, NULL is returned. * * The function makes sure to return keys not already expired. */ @@ -427,7 +427,7 @@ int dbAsyncDelete(serverDb *db, robj *key) { return dbGenericDelete(db, key, 1, DB_FLAG_KEY_DELETED); } -/* This is a wrapper whose behavior depends on the Redis lazy free +/* This is a wrapper whose behavior depends on the server lazy free * configuration. Deletes the key synchronously or asynchronously. */ int dbDelete(serverDb *db, robj *key) { return dbGenericDelete(db, key, server.lazyfree_lazy_server_del, DB_FLAG_KEY_DELETED); @@ -507,11 +507,11 @@ long long emptyDbStructure(serverDb *dbarray, int dbnum, int async, } /* Remove all data (keys and functions) from all the databases in a - * Redis server. If callback is given the function is called from + * server. If callback is given the function is called from * time to time to signal that work is in progress. * * The dbnum can be -1 if all the DBs should be flushed, or the specified - * DB number if we want to flush only a single Redis database number. + * DB number if we want to flush only a single database number. * * Flags are be EMPTYDB_NO_FLAGS if no special flags are specified or * EMPTYDB_ASYNC if we want the memory to be freed in a different thread @@ -542,7 +542,7 @@ long long emptyData(int dbnum, int flags, void(callback)(dict*)) { * there. */ signalFlushedDb(dbnum, async); - /* Empty redis database structure. */ + /* Empty the database structure. */ removed = emptyDbStructure(server.db, dbnum, async, callback); if (dbnum == -1) flushSlaveKeysWithExpireList(); @@ -695,7 +695,7 @@ void flushAllDataAndResetRDB(int flags) { /* FLUSHDB [ASYNC] * - * Flushes the currently SELECTed Redis DB. */ + * Flushes the currently SELECTed DB. */ void flushdbCommand(client *c) { int flags; @@ -885,7 +885,7 @@ void scanCallback(void *privdata, const dictEntry *de) { serverAssert(!((data->type != LLONG_MAX) && o)); /* Filter an element if it isn't the type we want. */ - /* TODO: uncomment in redis 8.0 + /* TODO: uncomment in version 8.0 if (!o && data->type != LLONG_MAX) { robj *rval = dictGetVal(de); if (!objectTypeCompare(rval, data->type)) return; @@ -1030,7 +1030,7 @@ void scanGenericCommand(client *c, robj *o, unsigned long long cursor) { typename = c->argv[i+1]->ptr; type = getObjectTypeByName(typename); if (type == LLONG_MAX) { - /* TODO: uncomment in redis 8.0 + /* TODO: uncomment in version 8.0 addReplyErrorFormat(c, "unknown type name '%s'", typename); return; */ } @@ -1185,7 +1185,7 @@ void scanGenericCommand(client *c, robj *o, unsigned long long cursor) { sds key = listNodeValue(ln); initStaticStringObject(kobj, key); /* Filter an element if it isn't the type we want. */ - /* TODO: remove this in redis 8.0 */ + /* TODO: remove this in version 8.0 */ if (typename) { robj* typecheck = lookupKeyReadWithFlags(c->db, &kobj, LOOKUP_NOTOUCH|LOOKUP_NONOTIFY); if (!typecheck || !objectTypeCompare(typecheck, type)) { @@ -1565,7 +1565,7 @@ void scanDatabaseForDeletedKeys(serverDb *emptied, serverDb *replaced_with) { * the new database even if already connected. Note that the client * structure c->db points to a given DB, so we need to be smarter and * swap the underlying referenced structures, otherwise we would need - * to fix all the references to the Redis DB structure. + * to fix all the references to the DB structure. * * Returns C_ERR if at least one of the DB ids are out of range, otherwise * C_OK is returned. */ @@ -2109,7 +2109,7 @@ invalid_spec: * length of the array is returned by reference into *numkeys. * * Along with the position, this command also returns the flags that are - * associated with how Redis will access the key. + * associated with how the server will access the key. * * 'cmd' must be point to the corresponding entry into the serverCommand * table, according to the command name in argv[0]. */ @@ -2146,7 +2146,7 @@ int doesCommandHaveKeys(struct serverCommand *cmd) { (getAllKeySpecsFlags(cmd, 1) & CMD_KEY_NOT_KEY); /* has at least one key-spec not marked as NOT_KEY */ } -/* A simplified channel spec table that contains all of the redis commands +/* A simplified channel spec table that contains all of the commands * and which channels they have and how they are accessed. */ typedef struct ChannelSpecs { serverCommandProc *proc; /* Command procedure to match against */ @@ -2193,7 +2193,7 @@ int doesCommandHaveChannelsWithFlags(struct serverCommand *cmd, int flags) { * length of the array is returned by reference into *numkeys. * * Along with the position, this command also returns the flags that are - * associated with how Redis will access the channel. + * associated with how the server will access the channel. * * 'cmd' must be point to the corresponding entry into the serverCommand * table, according to the command name in argv[0]. */ diff --git a/src/debug.c b/src/debug.c index b688ac898..5566aadb5 100644 --- a/src/debug.c +++ b/src/debug.c @@ -1789,9 +1789,9 @@ void logRegisters(ucontext_t *uc) { #endif /* HAVE_BACKTRACE */ -/* Return a file descriptor to write directly to the Redis log with the +/* Return a file descriptor to write directly to the server log with the * write(2) syscall, that can be used in critical sections of the code - * where the rest of Redis can't be trusted (for example during the memory + * where the rest of server can't be trusted (for example during the memory * test) or when an API call requires a raw fd. * * Close it with closeDirectLogFiledes(). */ @@ -2023,7 +2023,7 @@ void logModulesInfo(void) { } /* Log information about the "current" client, that is, the client that is - * currently being served by Redis. May be NULL if Redis is not serving a + * currently being served by the server. May be NULL if the server is not serving a * client right now. */ void logCurrentClient(client *cc, const char *title) { if (cc == NULL) return; @@ -2149,7 +2149,7 @@ static void killMainThread(void) { /* Kill the running threads (other than current) in an unclean way. This function * should be used only when it's critical to stop the threads for some reason. - * Currently Redis does this only on crash (for instance on SIGSEGV) in order + * Currently the server does this only on crash (for instance on SIGSEGV) in order * to perform a fast memory check without other threads messing with memory. */ void killThreads(void) { killMainThread(); diff --git a/src/dict.c b/src/dict.c index d2767939b..dcde86845 100644 --- a/src/dict.c +++ b/src/dict.c @@ -50,7 +50,7 @@ /* Using dictSetResizeEnabled() we make possible to disable * resizing and rehashing of the hash table as needed. This is very important - * for Redis, as we use copy-on-write and don't want to move too much memory + * for us, as we use copy-on-write and don't want to move too much memory * around when there is a child performing saving operations. * * Note that even when dict_can_resize is set to DICT_RESIZE_AVOID, not all diff --git a/src/endianconv.c b/src/endianconv.c index 9344c39ad..212bdcb52 100644 --- a/src/endianconv.c +++ b/src/endianconv.c @@ -4,7 +4,7 @@ * defined into endianconv.h, this way we define everything is a non-operation * if the arch is already little endian. * - * Redis tries to encode everything as little endian (but a few things that need + * The server tries to encode everything as little endian (but a few things that need * to be backward compatible are still in big endian) because most of the * production environments are little endian, and we have a lot of conversions * in a few places because ziplists, intsets, zipmaps, need to be endian-neutral diff --git a/src/eval.c b/src/eval.c index 654224680..587fb3b7a 100644 --- a/src/eval.c +++ b/src/eval.c @@ -80,7 +80,7 @@ dictType shaScriptObjectDictType = { /* Lua context */ struct luaCtx { lua_State *lua; /* The Lua interpreter. We use just one for all clients */ - client *lua_client; /* The "fake client" to query Redis from Lua */ + client *lua_client; /* The "fake client" to query the server from Lua */ dict *lua_scripts; /* A dictionary of SHA1 -> Lua scripts */ list *lua_scripts_lru_list; /* A list of SHA1, first in first out LRU eviction. */ unsigned long long lua_scripts_mem; /* Cached scripts' memory + oh */ @@ -94,7 +94,7 @@ struct ldbState { int active; /* Are we debugging EVAL right now? */ int forked; /* Is this a fork()ed debugging session? */ list *logs; /* List of messages to send to the client. */ - list *traces; /* Messages about Redis commands executed since last stop.*/ + list *traces; /* Messages about commands executed since last stop.*/ list *children; /* All forked debugging sessions pids. */ int bp[LDB_BREAKPOINTS_MAX]; /* An array of breakpoints line numbers. */ int bpcount; /* Number of valid entries inside bp. */ @@ -184,7 +184,7 @@ int luaRedisReplicateCommandsCommand(lua_State *lua) { * This function is called the first time at server startup with * the 'setup' argument set to 1. * - * It can be called again multiple times during the lifetime of the Redis + * It can be called again multiple times during the lifetime of the * process, with 'setup' set to 0, and following a scriptingRelease() call, * in order to reset the Lua scripting environment. * @@ -252,7 +252,7 @@ void scriptingInit(int setup) { lua_pcall(lua,0,0,0); } - /* Create the (non connected) client that we use to execute Redis commands + /* Create the (non connected) client that we use to execute server commands * inside the Lua interpreter. * Note: there is no need to create it again when this function is called * by scriptingReset(). */ @@ -285,7 +285,7 @@ void freeLuaScriptsSync(dict *lua_scripts, list *lua_scripts_lru_list, lua_State * using libc. libc may take a bit longer to return the memory to the OS, * so after lua_close, we call malloc_trim try to purge it earlier. * - * We do that only when Redis itself does not use libc. When Lua and Redis + * We do that only when the server itself does not use libc. When Lua and the server * use different allocators, one won't use the fragmentation holes of the * other, and released memory can take a long time until it is returned to * the OS. */ @@ -763,7 +763,7 @@ unsigned long evalScriptsMemory(void) { } /* --------------------------------------------------------------------------- - * LDB: Redis Lua debugging facilities + * LDB: Lua debugging facilities * ------------------------------------------------------------------------- */ /* Initialize Lua debugger data structures. */ @@ -860,7 +860,7 @@ void ldbSendLogs(void) { /* Start a debugging session before calling EVAL implementation. * The technique we use is to capture the client socket file descriptor, * in order to perform direct I/O with it from within Lua hooks. This - * way we don't have to re-enter Redis in order to handle I/O. + * way we don't have to re-enter the server in order to handle I/O. * * The function returns 1 if the caller should proceed to call EVAL, * and 0 if instead the caller should abort the operation (this happens @@ -1053,7 +1053,7 @@ sds *ldbReplParseCommand(int *argcp, char** err) { sds copy = sdsdup(ldb.cbuf); char *p = copy; - /* This Redis protocol parser is a joke... just the simplest thing that + /* This RESP parser is a joke... just the simplest thing that * works in this context. It is also very forgiving regarding broken * protocol. */ @@ -1244,7 +1244,7 @@ char *ldbRedisProtocolToHuman_Null(sds *o, char *reply); char *ldbRedisProtocolToHuman_Bool(sds *o, char *reply); char *ldbRedisProtocolToHuman_Double(sds *o, char *reply); -/* Get Redis protocol from 'reply' and appends it in human readable form to +/* Get RESP from 'reply' and appends it in human readable form to * the passed SDS string 'o'. * * Note that the SDS string is passed by reference (pointer of pointer to @@ -1267,7 +1267,7 @@ char *ldbRedisProtocolToHuman(sds *o, char *reply) { } /* The following functions are helpers for ldbRedisProtocolToHuman(), each - * take care of a given Redis return type. */ + * take care of a given RESP return type. */ char *ldbRedisProtocolToHuman_Int(sds *o, char *reply) { char *p = strchr(reply+1,'\r'); @@ -1372,7 +1372,7 @@ char *ldbRedisProtocolToHuman_Double(sds *o, char *reply) { return p+2; } -/* Log a Redis reply as debugger output, in a human readable format. +/* Log a RESP reply as debugger output, in a human readable format. * If the resulting string is longer than 'len' plus a few more chars * used as prefix, it gets truncated. */ void ldbLogRedisReply(char *reply) { @@ -1515,9 +1515,9 @@ void ldbEval(lua_State *lua, sds *argv, int argc) { lua_pop(lua,1); } -/* Implement the debugger "redis" command. We use a trick in order to make +/* Implement the debugger "server" command. We use a trick in order to make * the implementation very simple: we just call the Lua redis.call() command - * implementation, with ldb.step enabled, so as a side effect the Redis command + * implementation, with ldb.step enabled, so as a side effect the command * and its reply are logged. */ void ldbRedis(lua_State *lua, sds *argv, int argc) { int j; diff --git a/src/evict.c b/src/evict.c index be8cfad75..7b4937303 100644 --- a/src/evict.c +++ b/src/evict.c @@ -102,7 +102,7 @@ unsigned long long estimateObjectIdleTime(robj *o) { /* LRU approximation algorithm * - * Redis uses an approximation of the LRU algorithm that runs in constant + * The server uses an approximation of the LRU algorithm that runs in constant * memory. Every time there is a key to expire, we sample N keys (with * N very small, usually in around 5) to populate a pool of best keys to * evict of M keys (the pool size is defined by EVPOOL_SIZE). @@ -436,7 +436,7 @@ int getMaxmemoryState(size_t *total, size_t *logical, size_t *tofree, float *lev } /* Return 1 if used memory is more than maxmemory after allocating more memory, - * return 0 if not. Redis may reject user's requests or evict some keys if used + * return 0 if not. The server may reject user's requests or evict some keys if used * memory exceeds maxmemory, especially, when we allocate huge memory at once. */ int overMaxmemoryAfterAlloc(size_t moremem) { if (!server.maxmemory) return 0; /* No limit. */ @@ -517,10 +517,10 @@ static unsigned long evictionTimeLimitUs(void) { /* Check that memory usage is within the current "maxmemory" limit. If over * "maxmemory", attempt to free memory by evicting data (if it's safe to do so). * - * It's possible for Redis to suddenly be significantly over the "maxmemory" + * It's possible for the server to suddenly be significantly over the "maxmemory" * setting. This can happen if there is a large allocation (like a hash table * resize) or even if the "maxmemory" setting is manually adjusted. Because of - * this, it's important to evict for a managed period of time - otherwise Redis + * this, it's important to evict for a managed period of time - otherwise the server * would become unresponsive while evicting. * * The goal of this function is to improve the memory situation - not to diff --git a/src/expire.c b/src/expire.c index 4f0868d71..97b59a787 100644 --- a/src/expire.c +++ b/src/expire.c @@ -46,7 +46,7 @@ static double avg_ttl_factor[16] = {0.98, 0.9604, 0.941192, 0.922368, 0.903921, /* Helper function for the activeExpireCycle() function. * This function will try to expire the key that is stored in the hash table - * entry 'de' of the 'expires' hash table of a Redis database. + * entry 'de' of the 'expires' hash table of a database. * * If the key is found to be expired, it is removed from the database and * 1 is returned. Otherwise no operation is performed and 0 is returned. @@ -259,7 +259,7 @@ void activeExpireCycle(int type) { /* Continue to expire if at the end of the cycle there are still * a big percentage of keys to expire, compared to the number of keys * we scanned. The percentage, stored in config_cycle_acceptable_stale - * is not fixed, but depends on the Redis configured "expire effort". */ + * is not fixed, but depends on the configured "expire effort". */ do { unsigned long num; iteration++; diff --git a/src/functions.c b/src/functions.c index bee5ce232..b91428855 100644 --- a/src/functions.c +++ b/src/functions.c @@ -404,7 +404,7 @@ done: /* Register an engine, should be called once by the engine on startup and give the following: * * - engine_name - name of the engine to register - * - engine_ctx - the engine ctx that should be used by Redis to interact with the engine */ + * - engine_ctx - the engine ctx that should be used by the server to interact with the engine */ int functionsRegisterEngine(const char *engine_name, engine *engine) { sds engine_name_sds = sdsnew(engine_name); if (dictFetchValue(engines, engine_name_sds)) { diff --git a/src/functions.h b/src/functions.h index 522856085..54712d0da 100644 --- a/src/functions.h +++ b/src/functions.h @@ -31,7 +31,7 @@ #define __FUNCTIONS_H_ /* - * functions.c unit provides the Redis Functions API: + * functions.c unit provides the Functions API: * * FUNCTION LOAD * * FUNCTION LIST * * FUNCTION CALL (FCALL and FCALL_RO) @@ -68,7 +68,7 @@ typedef struct engine { int (*create)(void *engine_ctx, functionLibInfo *li, sds code, size_t timeout, sds *err); /* Invoking a function, r_ctx is an opaque object (from engine POV). - * The r_ctx should be used by the engine to interaction with Redis, + * The r_ctx should be used by the engine to interaction with the server, * such interaction could be running commands, set resp, or set * replication mode */ diff --git a/src/geo.c b/src/geo.c index 1004193e0..19266dce9 100644 --- a/src/geo.c +++ b/src/geo.c @@ -34,7 +34,7 @@ #include "pqsort.h" /* Things exported from t_zset.c only for geo.c, since it is the only other - * part of Redis that requires close zset introspection. */ + * part of the server that requires close zset introspection. */ unsigned char *zzlFirstInRange(unsigned char *zl, zrangespec *range); int zslValueLteMax(double value, zrangespec *spec); @@ -246,7 +246,7 @@ int geoWithinShape(GeoShape *shape, double score, double *xy, double *distance) return C_OK; } -/* Query a Redis sorted set to extract all the elements between 'min' and +/* Query a sorted set to extract all the elements between 'min' and * 'max', appending them into the array of geoPoint structures 'geoArray'. * The command returns the number of elements added to the array. * diff --git a/src/hyperloglog.c b/src/hyperloglog.c index 4f6f1eb45..beb5b179a 100644 --- a/src/hyperloglog.c +++ b/src/hyperloglog.c @@ -1,5 +1,5 @@ -/* hyperloglog.c - Redis HyperLogLog probabilistic cardinality approximation. - * This file implements the algorithm and the exported Redis commands. +/* hyperloglog.c - HyperLogLog probabilistic cardinality approximation. + * This file implements the algorithm and the exported commands. * * Copyright (c) 2014, Salvatore Sanfilippo * All rights reserved. @@ -34,14 +34,14 @@ #include #include -/* The Redis HyperLogLog implementation is based on the following ideas: +/* The HyperLogLog implementation is based on the following ideas: * * * The use of a 64 bit hash function as proposed in [1], in order to estimate * cardinalities larger than 10^9, at the cost of just 1 additional bit per * register. * * The use of 16384 6-bit registers for a great level of accuracy, using * a total of 12k per key. - * * The use of the Redis string data type. No new type is introduced. + * * The use of the string data type. No new type is introduced. * * No attempt is made to compress the data structure as in [1]. Also the * algorithm used is the original HyperLogLog Algorithm as in [2], with * the only difference that a 64 bit hash function is used, so no correction @@ -53,7 +53,7 @@ * [2] P. Flajolet, Éric Fusy, O. Gandouet, and F. Meunier. Hyperloglog: The * analysis of a near-optimal cardinality estimation algorithm. * - * Redis uses two representations: + * We use two representations: * * 1) A "dense" representation where every entry is represented by * a 6-bit integer. @@ -88,7 +88,7 @@ * Dense representation * === * - * The dense representation used by Redis is the following: + * The dense representation is the following: * * +--------+--------+--------+------// //--+ * |11000000|22221111|33333322|55444444 .... | @@ -391,7 +391,7 @@ static char *invalid_hll_err = "-INVALIDOBJ Corrupted HLL object detected"; /* ========================= HyperLogLog algorithm ========================= */ /* Our hash function is MurmurHash2, 64 bit version. - * It was modified for Redis in order to provide the same result in + * It was modified in order to provide the same result in * big and little endian archs (endian neutral). */ REDIS_NO_SANITIZE("alignment") uint64_t MurmurHash64A (const void * key, int len, unsigned int seed) { @@ -520,7 +520,7 @@ int hllDenseAdd(uint8_t *registers, unsigned char *ele, size_t elesize) { void hllDenseRegHisto(uint8_t *registers, int* reghisto) { int j; - /* Redis default is to use 16384 registers 6 bits each. The code works + /* Default is to use 16384 registers 6 bits each. The code works * with other values by modifying the defines, but for our target value * we take a faster path with unrolled loops. */ if (HLL_REGISTERS == 16384 && HLL_BITS == 6) { @@ -1271,7 +1271,7 @@ void pfcountCommand(client *c) { * The user specified a single key. Either return the cached value * or compute one and update the cache. * - * Since a HLL is a regular Redis string type value, updating the cache does + * Since a HLL is a regular string type value, updating the cache does * modify the value. We do a lookupKeyRead anyway since this is flagged as a * read-only command. The difference is that with lookupKeyWrite, a * logically expired key on a replica is deleted, while with lookupKeyRead @@ -1315,7 +1315,7 @@ void pfcountCommand(client *c) { hdr->card[6] = (card >> 48) & 0xff; hdr->card[7] = (card >> 56) & 0xff; /* This is considered a read-only command even if the cached value - * may be modified and given that the HLL is a Redis string + * may be modified and given that the HLL is a string * we need to propagate the change. */ signalModifiedKey(c,c->db,c->argv[1]); server.dirty++; diff --git a/src/kvstore.c b/src/kvstore.c index acfe62bb8..b3b166a0a 100644 --- a/src/kvstore.c +++ b/src/kvstore.c @@ -4,7 +4,7 @@ * The purpose of this KV store is to have easy access to all keys that belong * in the same dict (i.e. are in the same dict-index) * - * For example, when Redis is running in cluster mode, we use kvstore to save + * For example, when the server is running in cluster mode, we use kvstore to save * all keys that map to the same hash-slot in a separate dict within the kvstore * struct. * This enables us to easily access all keys that map to a specific hash-slot. diff --git a/src/latency.c b/src/latency.c index b5ec6e382..d900011c8 100644 --- a/src/latency.c +++ b/src/latency.c @@ -1,5 +1,5 @@ /* The latency monitor allows to easily observe the sources of latency - * in a Redis instance using the LATENCY command. Different latency + * in an instance using the LATENCY command. Different latency * sources are monitored, like disk I/O, execution of commands, fork * system call, and so forth. * @@ -198,7 +198,7 @@ void analyzeLatencyForEvent(char *event, struct latencyStats *ls) { if (ls->samples) ls->mad = sum / ls->samples; } -/* Create a human readable report of latency events for this Redis instance. */ +/* Create a human readable report of latency events for this instance. */ sds createLatencyReport(void) { sds report = sdsempty(); int advise_better_vm = 0; /* Better virtual machines. */ diff --git a/src/lazyfree.c b/src/lazyfree.c index 4733d8f99..22fa2dc86 100644 --- a/src/lazyfree.c +++ b/src/lazyfree.c @@ -172,7 +172,7 @@ void freeObjAsync(robj *key, robj *obj, int dbid) { size_t free_effort = lazyfreeGetFreeEffort(key,obj,dbid); /* Note that if the object is shared, to reclaim it now it is not * possible. This rarely happens, however sometimes the implementation - * of parts of the Redis core may call incrRefCount() to protect + * of parts of the server core may call incrRefCount() to protect * objects, and then call dbDelete(). */ if (free_effort > LAZYFREE_THRESHOLD && obj->refcount == 1) { atomicIncr(lazyfree_objects,1); @@ -182,7 +182,7 @@ void freeObjAsync(robj *key, robj *obj, int dbid) { } } -/* Empty a Redis DB asynchronously. What the function does actually is to +/* Empty a DB asynchronously. What the function does actually is to * create a new empty set of hash tables and scheduling the old ones for * lazy freeing. */ void emptyDbAsync(serverDb *db) { diff --git a/src/listpack.c b/src/listpack.c index 27becc9fa..8816a663c 100644 --- a/src/listpack.c +++ b/src/listpack.c @@ -165,7 +165,7 @@ int lpSafeToAdd(unsigned char* lp, size_t add) { * * ----------------------------------------------------------------------------- * - * Credits: this function was adapted from the Redis source code, file + * Credits: this function was adapted from the Redis OSS source code, file * "utils.c", function string2ll(), and is copyright: * * Copyright(C) 2011, Pieter Noordhuis diff --git a/src/localtime.c b/src/localtime.c index 1cefdfa88..da2d6c9d0 100644 --- a/src/localtime.c +++ b/src/localtime.c @@ -31,9 +31,9 @@ /* This is a safe version of localtime() which contains no locks and is * fork() friendly. Even the _r version of localtime() cannot be used safely - * in Redis. Another thread may be calling localtime() while the main thread + * in the server. Another thread may be calling localtime() while the main thread * forks(). Later when the child process calls localtime() again, for instance - * in order to log something to the Redis log, it may deadlock: in the copy + * in order to log something to the server log, it may deadlock: in the copy * of the address space of the forked process the lock will never be released. * * This function takes the timezone 'tz' as argument, and the 'dst' flag is @@ -47,7 +47,7 @@ * should be refreshed at safe times. * * Note that this function does not work for dates < 1/1/1970, it is solely - * designed to work with what time(NULL) may return, and to support Redis + * designed to work with what time(NULL) may return, and to support server * logging of the dates, it's not really a complete implementation. */ static int is_leap_year(time_t year) { if (year % 4) return 0; /* A year not divisible by 4 is not leap. */ diff --git a/src/lolwut.c b/src/lolwut.c index eca98cf18..268353898 100644 --- a/src/lolwut.c +++ b/src/lolwut.c @@ -30,7 +30,7 @@ * * This file implements the LOLWUT command. The command should do something * fun and interesting, and should be replaced by a new implementation at - * each new version of Redis. + * each new version of the server. */ #include "server.h" @@ -41,7 +41,7 @@ void lolwut5Command(client *c); void lolwut6Command(client *c); /* The default target for LOLWUT if no matching version was found. - * This is what unstable versions of Redis will display. */ + * This is what unstable versions of the server will display. */ void lolwutUnstableCommand(client *c) { sds rendered = sdsnew("Redis ver. "); rendered = sdscat(rendered,VALKEY_VERSION); diff --git a/src/lolwut5.c b/src/lolwut5.c index d293e77d9..b7d4c77d7 100644 --- a/src/lolwut5.c +++ b/src/lolwut5.c @@ -30,7 +30,7 @@ * * This file implements the LOLWUT command. The command should do something * fun and interesting, and should be replaced by a new implementation at - * each new version of Redis. + * each new version of the server. */ #include "server.h" @@ -61,7 +61,7 @@ void lwTranslatePixelsGroup(int byte, char *output) { output[2] = 0x80 | (code & 0x3F); /* 10-xxxxxx */ } -/* Schotter, the output of LOLWUT of Redis 5, is a computer graphic art piece +/* Schotter, the output of LOLWUT of Redis OSS 5, is a computer graphic art piece * generated by Georg Nees in the 60s. It explores the relationship between * caos and order. * diff --git a/src/lolwut6.c b/src/lolwut6.c index 440dba966..4e59c6870 100644 --- a/src/lolwut6.c +++ b/src/lolwut6.c @@ -30,7 +30,7 @@ * * This file implements the LOLWUT command. The command should do something * fun and interesting, and should be replaced by a new implementation at - * each new version of Redis. + * each new version of the server. * * Thanks to Michele Hiki Falcone for the original image that inspired * the image, part of his game, Plaguemon. diff --git a/src/module.c b/src/module.c index 281b1ee90..d43feba28 100644 --- a/src/module.c +++ b/src/module.c @@ -31,7 +31,7 @@ * Modules API documentation information * * The comments in this file are used to generate the API documentation on the - * Redis website. + * website. * * Each function starting with VM_ and preceded by a block comment is included * in the API documentation. To hide a VM_ function, put a blank line between @@ -69,7 +69,7 @@ /* -------------------------------------------------------------------------- * Private data structures used by the modules system. Those are data - * structures that are never exposed to Redis Modules, if not as void + * structures that are never exposed to Modules, if not as void * pointers that have an API the module can call with them) * -------------------------------------------------------------------------- */ @@ -109,7 +109,7 @@ struct AutoMemEntry { #define VALKEYMODULE_AM_DICT 4 #define VALKEYMODULE_AM_INFO 5 -/* The pool allocator block. Redis Modules can allocate memory via this special +/* The pool allocator block. Modules can allocate memory via this special * allocator that will automatically release it all once the callback returns. * This means that it can only be used for ephemeral allocations. However * there are two advantages for modules to use this API: @@ -132,7 +132,7 @@ typedef struct ValkeyModulePoolAllocBlock { char memory[]; } ValkeyModulePoolAllocBlock; -/* This structure represents the context in which Redis modules operate. +/* This structure represents the context in which modules operate. * Most APIs module can access, get a pointer to the context, so that the API * implementation can hold state across calls, or remember what to free after * the call and so forth. @@ -187,7 +187,7 @@ typedef struct ValkeyModuleCtx ValkeyModuleCtx; #define VALKEYMODULE_CTX_COMMAND (1<<9) /* Context created to serve a command from call() or AOF (which calls cmd->proc directly) */ -/* This represents a Redis key opened with VM_OpenKey(). */ +/* This represents a key opened with VM_OpenKey(). */ struct ValkeyModuleKey { ValkeyModuleCtx *ctx; serverDb *db; @@ -229,7 +229,7 @@ struct ValkeyModuleKey { #define VALKEYMODULE_ZSET_RANGE_POS 3 /* Function pointer type of a function representing a command inside - * a Redis module. */ + * a module. */ struct ValkeyModuleBlockedClient; typedef int (*ValkeyModuleCmdFunc) (ValkeyModuleCtx *ctx, void **argv, int argc); typedef int (*ValkeyModuleAuthCallback)(ValkeyModuleCtx *ctx, void *username, void *password, ValkeyModuleString **err); @@ -399,15 +399,15 @@ typedef struct ValkeyModuleServerInfoData { #define VALKEYMODULE_ARGV_DRY_RUN (1<<10) #define VALKEYMODULE_ARGV_ALLOW_BLOCK (1<<11) -/* Determine whether Redis should signalModifiedKey implicitly. +/* Determine whether the server should signalModifiedKey implicitly. * In case 'ctx' has no 'module' member (and therefore no module->options), - * we assume default behavior, that is, Redis signals. + * we assume default behavior, that is, the server signals. * (see VM_GetThreadSafeContext) */ #define SHOULD_SIGNAL_MODIFIED_KEYS(ctx) \ ((ctx)->module? !((ctx)->module->options & VALKEYMODULE_OPTION_NO_IMPLICIT_SIGNAL_MODIFIED) : 1) /* Server events hooks data structures and defines: this modules API - * allow modules to subscribe to certain events in Redis, such as + * allow modules to subscribe to certain events in the server, such as * the start and end of an RDB or AOF save, the change of role in replication, * and similar other events. */ @@ -419,13 +419,13 @@ typedef struct ValkeyModuleEventListener { list *ValkeyModule_EventListeners; /* Global list of all the active events. */ -/* Data structures related to the redis module users */ +/* Data structures related to the module users */ /* This is the object returned by VM_CreateModuleUser(). The module API is * able to create users, set ACLs to such users, and later authenticate * clients using such newly created users. */ typedef struct ValkeyModuleUser { - user *user; /* Reference to the real redis user */ + user *user; /* Reference to the real user */ int free_user; /* Indicates that user should also be freed when this object is freed */ } ValkeyModuleUser; @@ -439,7 +439,7 @@ typedef struct ValkeyModuleKeyOptCtx { as `copy2`, 'from_dbid' and 'to_dbid' are both valid. */ } ValkeyModuleKeyOptCtx; -/* Data structures related to redis module configurations */ +/* Data structures related to module configurations */ /* The function signatures for module config get callbacks. These are identical to the ones exposed in valkeymodule.h. */ typedef ValkeyModuleString * (*ValkeyModuleConfigGetStringFunc)(const char *name, void *privdata); typedef long long (*ValkeyModuleConfigGetNumericFunc)(const char *name, void *privdata); @@ -513,13 +513,13 @@ int moduleVerifyResourceName(const char *name); /* -------------------------------------------------------------------------- * ## Heap allocation raw functions * - * Memory allocated with these functions are taken into account by Redis key - * eviction algorithms and are reported in Redis memory usage information. + * Memory allocated with these functions are taken into account by key + * eviction algorithms and are reported in memory usage information. * -------------------------------------------------------------------------- */ /* Use like malloc(). Memory allocated with this function is reported in - * Redis INFO memory, used for keys eviction according to maxmemory settings - * and in general is taken into account as memory allocated by Redis. + * INFO memory, used for keys eviction according to maxmemory settings + * and in general is taken into account as memory allocated by the server. * You should avoid using malloc(). * This function panics if unable to allocate enough memory. */ void *VM_Alloc(size_t bytes) { @@ -540,8 +540,8 @@ void *VM_TryAlloc(size_t bytes) { } /* Use like calloc(). Memory allocated with this function is reported in - * Redis INFO memory, used for keys eviction according to maxmemory settings - * and in general is taken into account as memory allocated by Redis. + * INFO memory, used for keys eviction according to maxmemory settings + * and in general is taken into account as memory allocated by the server. * You should avoid using calloc() directly. */ void *VM_Calloc(size_t nmemb, size_t size) { return zcalloc_usable(nmemb*size,NULL); @@ -848,7 +848,7 @@ void moduleFreeContext(ValkeyModuleCtx *ctx) { } static CallReply *moduleParseReply(client *c, ValkeyModuleCtx *ctx) { - /* Convert the result of the Redis command into a module reply. */ + /* Convert the result of the command into a module reply. */ sds proto = sdsnewlen(c->buf,c->bufpos); c->bufpos = 0; while(listLength(c->reply)) { @@ -923,7 +923,7 @@ void moduleCreateContext(ValkeyModuleCtx *out_ctx, ValkeyModule *module, int ctx } } -/* This Redis command binds the normal Redis command invocation with commands +/* This command binds the normal command invocation with commands * exported by modules. */ void ValkeyModuleCommandDispatcher(client *c) { ValkeyModuleCommand *cp = c->cmd->module_cmd; @@ -940,7 +940,7 @@ void ValkeyModuleCommandDispatcher(client *c) { * the client argument vectors: sometimes this will result in the SDS * string having unused space at the end. Later if a module takes ownership * of the RedisString, such space will be wasted forever. Inside the - * Redis core this is not a problem because tryObjectEncoding() is called + * server core this is not a problem because tryObjectEncoding() is called * before storing strings in the key space. Here we need to do it * for the module. */ for (int i = 0; i < c->argc; i++) { @@ -999,7 +999,7 @@ int moduleGetCommandChannelsViaAPI(struct serverCommand *cmd, robj **argv, int a /* -------------------------------------------------------------------------- * ## Commands API * - * These functions are used to implement custom Redis commands. + * These functions are used to implement custom commands. * * For examples, see https://redis.io/topics/modules-intro. * -------------------------------------------------------------------------- */ @@ -1076,8 +1076,8 @@ int VM_IsChannelsPositionRequest(ValkeyModuleCtx *ctx) { * * VALKEYMODULE_CMD_CHANNEL_PUBLISH: This command will publish to this channel. * * VALKEYMODULE_CMD_CHANNEL_PATTERN: Instead of acting on a specific channel, will act on any * channel specified by the pattern. This is the same access - * used by the PSUBSCRIBE and PUNSUBSCRIBE commands available - * in Redis. Not intended to be used with PUBLISH permissions. + * used by the PSUBSCRIBE and PUNSUBSCRIBE commands. + * Not intended to be used with PUBLISH permissions. * * The following is an example of how it could be used: * @@ -1134,7 +1134,7 @@ int isCommandNameValid(const char *name) { } /* Helper for VM_CreateCommand(). Turns a string representing command - * flags into the command flags used by the Redis core. + * flags into the command flags used by the server core. * * It returns the set of flags, or -1 if unknown flags are found. */ int64_t commandFlagsFromString(char *s) { @@ -1172,7 +1172,7 @@ int64_t commandFlagsFromString(char *s) { ValkeyModuleCommand *moduleCreateCommandProxy(struct ValkeyModule *module, sds declared_name, sds fullname, ValkeyModuleCmdFunc cmdfunc, int64_t flags, int firstkey, int lastkey, int keystep); -/* Register a new command in the Redis server, that will be handled by +/* Register a new command in the server, that will be handled by * calling the function pointer 'cmdfunc' using the ValkeyModule calling * convention. * @@ -1213,7 +1213,7 @@ ValkeyModuleCommand *moduleCreateCommandProxy(struct ValkeyModule *module, sds d * * **"pubsub"**: The command publishes things on Pub/Sub channels. * * **"random"**: The command may have different outputs even starting * from the same input arguments and key values. - * Starting from Redis 7.0 this flag has been deprecated. + * Starting from Redis OSS 7.0 this flag has been deprecated. * Declaring a command as "random" can be done using * command tips, see https://redis.io/topics/command-tips. * * **"allow-stale"**: The command is allowed to run on slaves that don't @@ -1230,7 +1230,7 @@ ValkeyModuleCommand *moduleCreateCommandProxy(struct ValkeyModule *module, sds d * * **"getkeys-api"**: The command implements the interface to return * the arguments that are keys. Used when start/stop/step * is not enough because of the command syntax. - * * **"no-cluster"**: The command should not register in Redis Cluster + * * **"no-cluster"**: The command should not register in Cluster * since is not designed to work with it because, for * example, is unable to report the position of the * keys, programmatically creates key names, or any @@ -1249,7 +1249,7 @@ ValkeyModuleCommand *moduleCreateCommandProxy(struct ValkeyModule *module, sds d * the arguments that are channels. * * The last three parameters specify which arguments of the new command are - * Redis keys. See https://redis.io/commands/command for more information. + * keys. See https://valkey.io/commands/command for more information. * * * `firstkey`: One-based index of the first argument that's a key. * Position 0 is always the command name itself. @@ -1267,7 +1267,7 @@ ValkeyModuleCommand *moduleCreateCommandProxy(struct ValkeyModule *module, sds d * only be used to find keys that exist at constant indices. * For non-trivial key arguments, you may pass 0,0,0 and use * ValkeyModule_SetCommandInfo to set key specs using a more advanced scheme and use - * ValkeyModule_SetCommandACLCategories to set Redis ACL categories of the commands. */ + * ValkeyModule_SetCommandACLCategories to set ACL categories of the commands. */ int VM_CreateCommand(ValkeyModuleCtx *ctx, const char *name, ValkeyModuleCmdFunc cmdfunc, const char *strflags, int firstkey, int lastkey, int keystep) { if (!ctx->module->onload) return VALKEYMODULE_ERR; @@ -1307,7 +1307,7 @@ ValkeyModuleCommand *moduleCreateCommandProxy(struct ValkeyModule *module, sds d /* Create a command "proxy", which is a structure that is referenced * in the command table, so that the generic command that works as - * binding between modules and Redis, can know what function to call + * binding between modules and the server, can know what function to call * and what the module is. */ cp = zcalloc(sizeof(*cp)); cp->module = module; @@ -1518,7 +1518,7 @@ int matchAclCategoryFlag(char *flag, int64_t *acl_categories_flags) { } /* Helper for VM_SetCommandACLCategories(). Turns a string representing acl category - * flags into the acl category flags used by Redis ACL which allows users to access + * flags into the acl category flags used by the server ACL which allows users to access * the module commands by acl categories. * * It returns the set of acl flags, or -1 if unknown flags are found. */ @@ -1584,7 +1584,7 @@ int VM_SetCommandACLCategories(ValkeyModuleCommand *command, const char *aclflag * * All fields except `version` are optional. Explanation of the fields: * - * - `version`: This field enables compatibility with different Redis versions. + * - `version`: This field enables compatibility with different server versions. * Always set this field to VALKEYMODULE_COMMAND_INFO_VERSION. * * - `summary`: A short description of the command (optional). @@ -1592,7 +1592,7 @@ int VM_SetCommandACLCategories(ValkeyModuleCommand *command, const char *aclflag * - `complexity`: Complexity description (optional). * * - `since`: The version where the command was introduced (optional). - * Note: The version specified should be the module's, not Redis version. + * Note: The version specified should be the module's, not the server version. * * - `history`: An array of ValkeyModuleCommandHistoryEntry (optional), which is * a struct with the following fields: @@ -1609,7 +1609,7 @@ int VM_SetCommandACLCategories(ValkeyModuleCommand *command, const char *aclflag * * - `arity`: Number of arguments, including the command name itself. A positive * number specifies an exact number of arguments and a negative number - * specifies a minimum number of arguments, so use -N to say >= N. Redis + * specifies a minimum number of arguments, so use -N to say >= N. The server * validates a call before passing it to a module, so this can replace an * arity check inside the module command implementation. A value of 0 (or an * omitted arity field) is equivalent to -2 if the command has sub commands @@ -1626,7 +1626,7 @@ int VM_SetCommandACLCategories(ValkeyModuleCommand *command, const char *aclflag * * Key-specs cause the triplet (firstkey, lastkey, keystep) given in * VM_CreateCommand to be recomputed, but it is still useful to provide - * these three parameters in VM_CreateCommand, to better support old Redis + * these three parameters in VM_CreateCommand, to better support old server * versions where VM_SetCommandInfo is not available. * * Note that key-specs don't fully replace the "getkeys-api" (see @@ -2283,7 +2283,7 @@ void moduleListFree(void *config) { void VM_SetModuleAttribs(ValkeyModuleCtx *ctx, const char *name, int ver, int apiver) { /* Called by VM_Init() to setup the `ctx->module` structure. * - * This is an internal function, Redis modules developers don't need + * This is an internal function, module developers don't need * to use it. */ ValkeyModule *module; @@ -2376,21 +2376,21 @@ int VM_BlockedClientMeasureTimeEnd(ValkeyModuleBlockedClient *bc) { return VALKEYMODULE_OK; } -/* This API allows modules to let Redis process background tasks, and some +/* This API allows modules to let the server process background tasks, and some * commands during long blocking execution of a module command. * The module can call this API periodically. * The flags is a bit mask of these: * * - `VALKEYMODULE_YIELD_FLAG_NONE`: No special flags, can perform some background * operations, but not process client commands. - * - `VALKEYMODULE_YIELD_FLAG_CLIENTS`: Redis can also process client commands. + * - `VALKEYMODULE_YIELD_FLAG_CLIENTS`: The server can also process client commands. * * The `busy_reply` argument is optional, and can be used to control the verbose * error string after the `-BUSY` error code. * - * When the `VALKEYMODULE_YIELD_FLAG_CLIENTS` is used, Redis will only start + * When the `VALKEYMODULE_YIELD_FLAG_CLIENTS` is used, the server will only start * processing client commands after the time defined by the - * `busy-reply-threshold` config, in which case Redis will start rejecting most + * `busy-reply-threshold` config, in which case the server will start rejecting most * commands with `-BUSY` error, but allow the ones marked with the `allow-busy` * flag to be executed. * This API can also be used in thread safe context (while locked), and during @@ -2407,10 +2407,10 @@ void VM_Yield(ValkeyModuleCtx *ctx, int flags, const char *busy_reply) { long long now = getMonotonicUs(); if (now >= ctx->next_yield_time) { /* In loading mode, there's no need to handle busy_module_yield_reply, - * and busy_module_yield_flags, since redis is anyway rejecting all + * and busy_module_yield_flags, since the server is anyway rejecting all * commands with -LOADING. */ if (server.loading) { - /* Let redis process events */ + /* Let the server process events */ processEventsWhileBlocked(); } else { const char *prev_busy_module_yield_reply = server.busy_module_yield_reply; @@ -2425,7 +2425,7 @@ void VM_Yield(ValkeyModuleCtx *ctx, int flags, const char *busy_reply) { if (flags & VALKEYMODULE_YIELD_FLAG_CLIENTS) server.busy_module_yield_flags |= BUSY_MODULE_YIELD_CLIENTS; - /* Let redis process events */ + /* Let the server process events */ if (!pthread_equal(server.main_thread_id, pthread_self())) { /* If we are not in the main thread, we defer event loop processing to the main thread * after the main thread enters acquiring GIL state in order to protect the event @@ -2482,11 +2482,11 @@ void VM_Yield(ValkeyModuleCtx *ctx, int flags, const char *busy_reply) { * * VALKEYMODULE_OPTIONS_HANDLE_REPL_ASYNC_LOAD: * Setting this flag indicates module awareness of diskless async replication (repl-diskless-load=swapdb) - * and that redis could be serving reads during replication instead of blocking with LOADING status. + * and that the server could be serving reads during replication instead of blocking with LOADING status. * * VALKEYMODULE_OPTIONS_ALLOW_NESTED_KEYSPACE_NOTIFICATIONS: * Declare that the module wants to get nested key-space notifications. - * By default, Redis will not fire key-space notifications that happened inside + * By default, the server will not fire key-space notifications that happened inside * a key-space notification callback. This flag allows to change this behavior * and fire nested key-space notifications. Notice: if enabled, the module * should protected itself from infinite recursion. */ @@ -2516,7 +2516,7 @@ int VM_SignalModifiedKey(ValkeyModuleCtx *ctx, ValkeyModuleString *keyname) { * that wants to use automatic memory. * * When enabled, automatic memory management tracks and automatically frees - * keys, call replies and Redis string objects once the command returns. In most + * keys, call replies and RedisModuleString objects once the command returns. In most * cases this eliminates the need of calling the following functions: * * 1. ValkeyModule_CloseKey() @@ -2725,7 +2725,7 @@ ValkeyModuleString *VM_CreateStringFromStreamID(ValkeyModuleCtx *ctx, const Valk return o; } -/* Free a module string object obtained with one of the Redis modules API calls +/* Free a module string object obtained with one of the module API calls * that return new string objects. * * It is possible to call this function even when automatic memory management @@ -2984,11 +2984,11 @@ int VM_StringAppendBuffer(ValkeyModuleCtx *ctx, ValkeyModuleString *str, const c * string in a module command before the string is potentially available * to other threads is generally safe. * - * Currently, Redis may also automatically trim retained strings when a + * Currently, the server may also automatically trim retained strings when a * module command returns. However, doing this explicitly should still be * a preferred option: * - * 1. Future versions of Redis may abandon auto-trimming. + * 1. Future versions of the server may abandon auto-trimming. * 2. Auto-trimming as currently implemented is *not thread safe*. * A background thread manipulating a recently retained string may end up * in a race condition with the auto-trim, which could result with @@ -3452,7 +3452,7 @@ int VM_ReplyWithBool(ValkeyModuleCtx *ctx, int b) { return VALKEYMODULE_OK; } -/* Reply exactly what a Redis command returned us with ValkeyModule_Call(). +/* Reply exactly what a command returned us with ValkeyModule_Call(). * This function is useful when we use ValkeyModule_Call() in order to * execute some command, as we want to reply to the client exactly the * same reply we obtained by the command. @@ -3565,8 +3565,8 @@ int VM_ReplyWithLongDouble(ValkeyModuleCtx *ctx, long double ld) { * #### Note about calling this function from a thread safe context: * * Normally when you call this function from the callback implementing a - * module command, or any other callback provided by the Redis Module API, - * Redis will accumulate all the calls to this function in the context of + * module command, or any other callback provided by the Module API, + * The server will accumulate all the calls to this function in the context of * the callback, and will propagate all the commands wrapped in a MULTI/EXEC * transaction. However when calling this function from a threaded safe context * that can live an undefined amount of time, and can be locked/unlocked in @@ -3838,7 +3838,7 @@ int VM_GetSelectedDb(ValkeyModuleCtx *ctx) { /* Return the current context's flags. The flags provide information on the * current request context (whether the client is a Lua script or in a MULTI), - * and about the Redis instance in general, i.e replication and persistence. + * and about the instance in general, i.e replication and persistence. * * It is possible to call this function even with a NULL context, however * in this case the following flags will not be reported: @@ -3854,15 +3854,15 @@ int VM_GetSelectedDb(ValkeyModuleCtx *ctx) { * * VALKEYMODULE_CTX_FLAGS_REPLICATED: The command was sent over the replication * link by the MASTER * - * * VALKEYMODULE_CTX_FLAGS_PRIMARY: The Redis instance is a primary + * * VALKEYMODULE_CTX_FLAGS_PRIMARY: The instance is a primary * - * * VALKEYMODULE_CTX_FLAGS_REPLICA: The Redis instance is a replica + * * VALKEYMODULE_CTX_FLAGS_REPLICA: The instance is a replica * - * * VALKEYMODULE_CTX_FLAGS_READONLY: The Redis instance is read-only + * * VALKEYMODULE_CTX_FLAGS_READONLY: The instance is read-only * - * * VALKEYMODULE_CTX_FLAGS_CLUSTER: The Redis instance is in cluster mode + * * VALKEYMODULE_CTX_FLAGS_CLUSTER: The instance is in cluster mode * - * * VALKEYMODULE_CTX_FLAGS_AOF: The Redis instance has AOF enabled + * * VALKEYMODULE_CTX_FLAGS_AOF: The instance has AOF enabled * * * VALKEYMODULE_CTX_FLAGS_RDB: The instance has RDB enabled * @@ -3871,7 +3871,7 @@ int VM_GetSelectedDb(ValkeyModuleCtx *ctx) { * * VALKEYMODULE_CTX_FLAGS_EVICT: Maxmemory is set and has an eviction * policy that may delete keys * - * * VALKEYMODULE_CTX_FLAGS_OOM: Redis is out of memory according to the + * * VALKEYMODULE_CTX_FLAGS_OOM: The server is out of memory according to the * maxmemory setting. * * * VALKEYMODULE_CTX_FLAGS_OOM_WARNING: Less than 25% of memory remains before @@ -3897,13 +3897,13 @@ int VM_GetSelectedDb(ValkeyModuleCtx *ctx) { * * VALKEYMODULE_CTX_FLAGS_MULTI_DIRTY: The next EXEC will fail due to dirty * CAS (touched keys). * - * * VALKEYMODULE_CTX_FLAGS_IS_CHILD: Redis is currently running inside + * * VALKEYMODULE_CTX_FLAGS_IS_CHILD: The server is currently running inside * background child process. * * * VALKEYMODULE_CTX_FLAGS_RESP3: Indicate the that client attached to this * context is using RESP3. * - * * VALKEYMODULE_CTX_FLAGS_SERVER_STARTUP: The Redis instance is starting + * * VALKEYMODULE_CTX_FLAGS_SERVER_STARTUP: The instance is starting */ int VM_GetContextFlags(ValkeyModuleCtx *ctx) { int flags = 0; @@ -3989,7 +3989,7 @@ int VM_GetContextFlags(ValkeyModuleCtx *ctx) { if (hasActiveChildProcess()) flags |= VALKEYMODULE_CTX_FLAGS_ACTIVE_CHILD; if (server.in_fork_child) flags |= VALKEYMODULE_CTX_FLAGS_IS_CHILD; - /* Non-empty server.loadmodule_queue means that Redis is starting. */ + /* Non-empty server.loadmodule_queue means that the server is starting. */ if (listLength(server.loadmodule_queue) > 0) flags |= VALKEYMODULE_CTX_FLAGS_SERVER_STARTUP; @@ -3997,7 +3997,7 @@ int VM_GetContextFlags(ValkeyModuleCtx *ctx) { } /* Returns true if a client sent the CLIENT PAUSE command to the server or - * if Redis Cluster does a manual failover, pausing the clients. + * if the Cluster does a manual failover, pausing the clients. * This is needed when we have a master with replicas, and want to write, * without adding further data to the replication channel, that the replicas * replication offset, match the one of the master. When this happens, it is @@ -4024,7 +4024,7 @@ int VM_AvoidReplicaTraffic(void) { * is out of range. * * Note that the client will retain the currently selected DB even after - * the Redis command implemented by the module calling this function + * the command implemented by the module calling this function * returns. * * If the module command wishes to change something in a different DB and @@ -4066,7 +4066,7 @@ static void moduleInitKeyTypeSpecific(ValkeyModuleKey *key) { } } -/* Return a handle representing a Redis key, so that it is possible +/* Return a handle representing a key, so that it is possible * to call other APIs with the key handle as argument to perform * operations on the key. * @@ -4116,7 +4116,7 @@ ValkeyModuleKey *VM_OpenKey(ValkeyModuleCtx *ctx, robj *keyname, int mode) { /** * Returns the full OpenKey modes mask, using the return value * the module can check if a certain set of OpenKey modes are supported - * by the redis server version in use. + * by the server version in use. * Example: * * int supportedMode = VM_GetOpenKeyModesAll(); @@ -4524,7 +4524,7 @@ int moduleListIteratorSeek(ValkeyModuleKey *key, long index, int mode) { * - ENOTSUP if the key is of another type than list. * - EBADF if the key is not opened for writing. * - * Note: Before Redis 7.0, `errno` was not set by this function. */ + * Note: Before Redis OSS 7.0, `errno` was not set by this function. */ int VM_ListPush(ValkeyModuleKey *key, int where, ValkeyModuleString *ele) { if (!key || !ele) { errno = EINVAL; @@ -4558,7 +4558,7 @@ int VM_ListPush(ValkeyModuleKey *key, int where, ValkeyModuleString *ele) { * - ENOTSUP if the key is empty or of another type than list. * - EBADF if the key is not opened for writing. * - * Note: Before Redis 7.0, `errno` was not set by this function. */ + * Note: Before Redis OSS 7.0, `errno` was not set by this function. */ ValkeyModuleString *VM_ListPop(ValkeyModuleKey *key, int where) { if (!key) { errno = EINVAL; @@ -4976,7 +4976,7 @@ int VM_ZsetLastInScoreRange(ValkeyModuleKey *key, double min, double max, int mi * VALKEYMODULE_ERR. * * Note that this function takes 'min' and 'max' in the same form of the - * Redis ZRANGEBYLEX command. */ + * ZRANGEBYLEX command. */ int zsetInitLexRange(ValkeyModuleKey *key, ValkeyModuleString *min, ValkeyModuleString *max, int first) { if (!key->value || key->value->type != OBJ_ZSET) return VALKEYMODULE_ERR; @@ -5225,7 +5225,7 @@ int VM_ZsetRangePrev(ValkeyModuleKey *key) { * strings instead of ValkeyModuleString objects. * VALKEYMODULE_HASH_COUNT_ALL: Include the number of inserted fields in the * returned number, in addition to the number of - * updated and deleted fields. (Added in Redis + * updated and deleted fields. (Added in Redis OSS * 6.2.) * * Unless NX is specified, the command overwrites the old field value with @@ -5245,7 +5245,7 @@ int VM_ZsetRangePrev(ValkeyModuleKey *key) { * flag VALKEYMODULE_HASH_COUNT_ALL is set, inserted fields not previously * existing in the hash are also counted. * - * If the return value is zero, `errno` is set (since Redis 6.2) as follows: + * If the return value is zero, `errno` is set (since Redis OSS 6.2) as follows: * * - EINVAL if any unknown flags are set or if key is NULL. * - ENOTSUP if the key is associated with a non Hash value. @@ -5256,8 +5256,8 @@ int VM_ZsetRangePrev(ValkeyModuleKey *key) { * back due to the NX and XX flags. * * NOTICE: The return value semantics of this function are very different - * between Redis 6.2 and older versions. Modules that use it should determine - * the Redis version and handle it accordingly. + * between Redis OSS 6.2 and older versions. Modules that use it should determine + * the server version and handle it accordingly. */ int VM_HashSet(ValkeyModuleKey *key, int flags, ...) { va_list ap; @@ -5891,9 +5891,9 @@ long long VM_StreamTrimByID(ValkeyModuleKey *key, int flags, ValkeyModuleStreamI } /* -------------------------------------------------------------------------- - * ## Calling Redis commands from modules + * ## Calling commands from modules * - * VM_Call() sends a command to Redis. The remaining functions handle the reply. + * VM_Call() sends a command to the server. The remaining functions handle the reply. * -------------------------------------------------------------------------- */ @@ -6043,7 +6043,7 @@ void VM_CallReplyPromiseSetUnblockHandler(ValkeyModuleCallReply *reply, ValkeyMo * If the execution was aborted successfully, it is promised that the unblock handler will not be called. * That said, it is possible that the abort operation will successes but the operation will still continue. * This can happened if, for example, a module implements some blocking command and does not respect the - * disconnect callback. For pure Redis commands this can not happened.*/ + * disconnect callback. For server-provided commands this can not happened.*/ int VM_CallReplyPromiseAbort(ValkeyModuleCallReply *reply, void **private_data) { ValkeyModuleAsyncRMCallPromise *promise = callReplyGetPrivateData(reply); if (!promise->c) return VALKEYMODULE_ERR; /* Promise can not be aborted, either already aborted or already finished. */ @@ -6197,9 +6197,9 @@ fmterr: return NULL; } -/* Exported API to call any Redis command from modules. +/* Exported API to call any command from modules. * - * * **cmdname**: The Redis command to call. + * * **cmdname**: The command to call. * * **fmt**: A format specifier string for the command's arguments. Each * of the arguments should be specified by a valid type specification. The * format specifier can also contain the modifiers `!`, `A`, `3` and `R` which @@ -6211,7 +6211,7 @@ fmterr: * * `l` -- The argument is a `long long` integer. * * `s` -- The argument is a ValkeyModuleString. * * `v` -- The argument(s) is a vector of ValkeyModuleString. - * * `!` -- Sends the Redis command and its arguments to replicas and AOF. + * * `!` -- Sends the command and its arguments to replicas and AOF. * * `A` -- Suppress AOF propagation, send only to replicas (requires `!`). * * `R` -- Suppress replicas propagation, send only to AOF (requires `!`). * * `3` -- Return a RESP3 reply. This will change the command reply. @@ -6229,7 +6229,7 @@ fmterr: * the command to run as the determined user, so that any future user * dependent activity, such as ACL checks within scripts will proceed as * expected. - * Otherwise, the command will run as the Redis unrestricted user. + * Otherwise, the command will run as the unrestricted user. * * `S` -- Run the command in a script mode, this means that it will raise * an error if a command which are not allowed inside a script * (flagged with the `deny-script` flag) is invoked (like SHUTDOWN). @@ -6252,7 +6252,7 @@ fmterr: * The module can use this reply object to set a handler which will be called when * the command gets unblocked using ValkeyModule_CallReplyPromiseSetUnblockHandler. * The handler must be set immediately after the command invocation (without releasing - * the Redis lock in between). If the handler is not set, the blocking command will + * the lock in between). If the handler is not set, the blocking command will * still continue its execution but the reply will be ignored (fire and forget), * notice that this is dangerous in case of role change, as explained below. * The module can use ValkeyModule_CallReplyPromiseAbort to abort the command invocation @@ -6260,21 +6260,21 @@ fmterr: * details). It is also the module's responsibility to abort the execution on role change, either by using * server event (to get notified when the instance becomes a replica) or relying on the disconnect * callback of the original client. Failing to do so can result in a write operation on a replica. - * Unlike other call replies, promise call reply **must** be freed while the Redis GIL is locked. + * Unlike other call replies, promise call reply **must** be freed while the GIL is locked. * Notice that on unblocking, the only promise is that the unblock handler will be called, * If the blocking VM_Call caused the module to also block some real client (using VM_BlockClient), * it is the module responsibility to unblock this client on the unblock handler. * On the unblock handler it is only allowed to perform the following: - * * Calling additional Redis commands using VM_Call + * * Calling additional commands using VM_Call * * Open keys using VM_OpenKey * * Replicate data to the replica or AOF * - * Specifically, it is not allowed to call any Redis module API which are client related such as: + * Specifically, it is not allowed to call any module API which are client related such as: * * VM_Reply* API's * * VM_BlockClient * * VM_GetCurrentUserName * - * * **...**: The actual arguments to the Redis command. + * * **...**: The actual arguments to the command. * * On success a ValkeyModuleCallReply object is returned, otherwise * NULL is returned and errno is set to the following values: @@ -6511,7 +6511,7 @@ ValkeyModuleCallReply *VM_Call(ValkeyModuleCtx *ctx, const char *cmdname, const } } - /* If this is a Redis Cluster node, we need to make sure the module is not + /* If this is a Cluster node, we need to make sure the module is not * trying to access non-local keys, with the exception of commands * received from our master. */ if (server.cluster_enabled && !mustObeyClient(ctx->client)) { @@ -6616,8 +6616,8 @@ const char *VM_CallReplyProto(ValkeyModuleCallReply *reply, size_t *len) { * ## Modules data types * * When String DMA or using existing data structures is not enough, it is - * possible to create new data types from scratch and export them to - * Redis. The module must provide a set of callbacks for handling the + * possible to create new data types from scratch. + * The module must provide a set of callbacks for handling the * new values exported (for example in order to provide RDB saving/loading, * AOF rewrite, and so forth). In this section we define this API. * -------------------------------------------------------------------------- */ @@ -6810,7 +6810,7 @@ robj *moduleTypeDupOrReply(client *c, robj *fromkey, robj *tokey, int todb, robj * following. Please for in depth documentation check the modules API * documentation, especially https://redis.io/topics/modules-native-types. * - * * **name**: A 9 characters data type name that MUST be unique in the Redis + * * **name**: A 9 characters data type name that MUST be unique in the * Modules ecosystem. Be creative... and there will be no collisions. Use * the charset A-Z a-z 9-0, plus the two "-_" characters. A good * idea is to use, for example `-`. For example @@ -6870,7 +6870,7 @@ robj *moduleTypeDupOrReply(client *c, robj *fromkey, robj *tokey, int todb, robj * freeing the value. for example: how many pointers are gonna be freed. Note that if it * returns 0, we'll always do an async free. * * **unlink**: A callback function pointer that used to notifies the module that the key has - * been removed from the DB by redis, and may soon be freed by a background thread. Note that + * been removed from the DB by the server, and may soon be freed by a background thread. Note that * it won't be called on FLUSHALL/FLUSHDB (both sync and async), and the module can use the * ValkeyModuleEvent_FlushDB to hook into that. * * **copy**: A callback function pointer that is used to make a copy of the specified key. @@ -6914,7 +6914,7 @@ robj *moduleTypeDupOrReply(client *c, robj *fromkey, robj *tokey, int todb, robj * If ValkeyModule_CreateDataType() is called outside of ValkeyModule_OnLoad() function, * there is already a module registering a type with the same name, * or if the module name or encver is invalid, NULL is returned. - * Otherwise the new type is registered into Redis, and a reference of + * Otherwise the new type is registered into the server, and a reference of * type ValkeyModuleType is returned: the caller of the function should store * this reference into a global variable to make future use of it in the * modules type API, since a single module may register multiple types. @@ -7390,11 +7390,11 @@ ssize_t rdbSaveModulesAux(rio *rdb, int when) { * one element after the other, for all the elements that constitute a given * data structure. The function call must be followed by the call to * `ValkeyModule_DigestEndSequence` eventually, when all the elements that are - * always in a given order are added. See the Redis Modules data types - * documentation for more info. However this is a quick example that uses Redis - * data types as an example. + * always in a given order are added. See the Modules data types + * documentation for more info. However this is a quick example that uses the + * Set, Hash and List data types as an example. * - * To add a sequence of unordered elements (for example in the case of a Redis + * To add a sequence of unordered elements (for example in the case of a * Set), the pattern to use is: * * foreach element { @@ -7414,7 +7414,7 @@ ssize_t rdbSaveModulesAux(rio *rdb, int when) { * } * * Because the key and value will be always in the above order, while instead - * the single key-value pairs, can appear in any position into a Redis hash. + * the single key-value pairs, can appear in any position into a hash. * * A list of ordered elements would be implemented with: * @@ -7447,13 +7447,13 @@ void VM_DigestEndSequence(ValkeyModuleDigest *md) { * * This call basically reuses the 'rdb_load' callback which module data types * implement in order to allow a module to arbitrarily serialize/de-serialize - * keys, similar to how the Redis 'DUMP' and 'RESTORE' commands are implemented. + * keys, similar to how the 'DUMP' and 'RESTORE' commands are implemented. * * Modules should generally use the VALKEYMODULE_OPTIONS_HANDLE_IO_ERRORS flag and * make sure the de-serialization code properly checks and handles IO errors * (freeing allocated buffers and returning a NULL). * - * If this is NOT done, Redis will handle corrupted (or just truncated) serialized + * If this is NOT done, the server will handle corrupted (or just truncated) serialized * data by producing an error message and terminating the process. */ void *VM_LoadDataTypeFromStringEncver(const ValkeyModuleString *str, const moduleType *mt, int encver) { @@ -7487,7 +7487,7 @@ void *VM_LoadDataTypeFromString(const ValkeyModuleString *str, const moduleType * * This call basically reuses the 'rdb_save' callback which module data types * implement in order to allow a module to arbitrarily serialize/de-serialize - * keys, similar to how the Redis 'DUMP' and 'RESTORE' commands are implemented. + * keys, similar to how the 'DUMP' and 'RESTORE' commands are implemented. */ ValkeyModuleString *VM_SaveDataTypeToString(ValkeyModuleCtx *ctx, void *data, const moduleType *mt) { rio payload; @@ -7526,7 +7526,7 @@ int VM_GetDbIdFromDigest(ValkeyModuleDigest *dig) { * is only called in the context of the aof_rewrite method of data types exported * by a module. The command works exactly like ValkeyModule_Call() in the way * the parameters are passed, but it does not return anything as the error - * handling is performed by Redis itself. */ + * handling is performed by the server itself. */ void VM_EmitAOF(ValkeyModuleIO *io, const char *cmdname, const char *fmt, ...) { if (io->error) return; struct serverCommand *cmd; @@ -7545,7 +7545,7 @@ void VM_EmitAOF(ValkeyModuleIO *io, const char *cmdname, const char *fmt, ...) { return; } - /* Emit the arguments into the AOF in Redis protocol format. */ + /* Emit the arguments into the AOF in RESP format. */ va_start(ap, fmt); argv = moduleCreateArgvFromUserFormat(cmdname,fmt,&argc,&flags,ap); va_end(ap); @@ -7636,7 +7636,7 @@ void moduleLogRaw(ValkeyModule *module, const char *levelstr, const char *fmt, v serverLogRaw(level,msg); } -/* Produces a log message to the standard Redis log, the format accepts +/* Produces a log message to the standard server log, the format accepts * printf-alike specifiers, while level is a string describing the log * level to use when emitting the log, and must be one of the following: * @@ -7673,13 +7673,13 @@ void VM_LogIOError(ValkeyModuleIO *io, const char *levelstr, const char *fmt, .. va_end(ap); } -/* Redis-like assert function. +/* Valkey assert function. * * The macro `ValkeyModule_Assert(expression)` is recommended, rather than * calling this function directly. * * A failed assertion will shut down the server and produce logging information - * that looks identical to information generated by Redis itself. + * that looks identical to information generated by the server itself. */ void VM__Assert(const char *estr, const char *file, int line) { _serverAssert(estr, file, line); @@ -7712,7 +7712,7 @@ int isModuleClientUnblocked(client *c) { * because the client is terminated, but is also called for cleanup when a * client is unblocked in a clean way after replaying. * - * What we do here is just to set the client to NULL in the redis module + * What we do here is just to set the client to NULL in the module * blocked client handle. This way if the client is terminated while there * is a pending threaded operation involving the blocked client, we'll know * that the client no longer exists and no reply callback should be called. @@ -8124,10 +8124,10 @@ void VM_BlockClientSetPrivateData(ValkeyModuleBlockedClient *blocked_client, voi } /* This call is similar to ValkeyModule_BlockClient(), however in this case we - * don't just block the client, but also ask Redis to unblock it automatically + * don't just block the client, but also ask the server to unblock it automatically * once certain keys become "ready", that is, contain more data. * - * Basically this is similar to what a typical Redis command usually does, + * Basically this is similar to what a typical command usually does, * like BLPOP or BZPOPMAX: the client blocks if it cannot be served ASAP, * and later when the key receives new data (a list push for instance), the * client is unblocked and served. @@ -8166,7 +8166,7 @@ void VM_BlockClientSetPrivateData(ValkeyModuleBlockedClient *blocked_client, voi * be accessible later in the reply callback. Normally when blocking with * ValkeyModule_BlockClient() the private data to reply to the client is * passed when calling ValkeyModule_UnblockClient() but here the unblocking - * is performed by Redis itself, so we need to have some private data before + * is performed by the server itself, so we need to have some private data before * hand. The private data is used to store any information about the specific * unblocking operation that you are implementing. Such information will be * freed using the free_privdata callback provided by the user. @@ -8225,7 +8225,7 @@ int moduleUnblockClientByHandle(ValkeyModuleBlockedClient *bc, void *privdata) { return VALKEYMODULE_OK; } -/* This API is used by the Redis core to unblock a client that was blocked +/* This API is used by the server core to unblock a client that was blocked * by a module. */ void moduleUnblockClient(client *c) { ValkeyModuleBlockedClient *bc = c->bstate.module_blocked_handle; @@ -8304,7 +8304,7 @@ void VM_SetDisconnectCallback(ValkeyModuleBlockedClient *bc, ValkeyModuleDisconn * * Clients end into this list because of calls to VM_UnblockClient(), * however it is possible that while the module was doing work for the - * blocked client, it was terminated by Redis (for timeout or other reasons). + * blocked client, it was terminated by the server (for timeout or other reasons). * When this happens the ValkeyModuleBlockedClient structure in the queue * will have the 'client' field set to NULL. */ void moduleHandleBlockedClients(void) { @@ -8506,8 +8506,8 @@ int VM_BlockedClientDisconnected(ValkeyModuleCtx *ctx) { * ## Thread Safe Contexts * -------------------------------------------------------------------------- */ -/* Return a context which can be used inside threads to make Redis context - * calls with certain modules APIs. If 'bc' is not NULL then the module will +/* Return a context which can be used inside threads to make calls requiring a + * context with certain modules APIs. If 'bc' is not NULL then the module will * be bound to a blocked client, and it will be possible to use the * `ValkeyModule_Reply*` family of functions to accumulate a reply for when the * client will be unblocked. Otherwise the thread safe context will be @@ -8698,9 +8698,9 @@ void moduleReleaseGIL(void) { * * `type` is the event type bit, that must match the mask given at registration * time. The event string is the actual command being executed, and key is the - * relevant Redis key. + * relevant key. * - * Notification callback gets executed with a redis context that can not be + * Notification callback gets executed with a context that can not be * used to send anything to the client, and has the db number where the event * occurred as its selected db number. * @@ -8708,11 +8708,11 @@ void moduleReleaseGIL(void) { * module notifications to work. * * Warning: the notification callbacks are performed in a synchronous manner, - * so notification callbacks must to be fast, or they would slow Redis down. + * so notification callbacks must to be fast, or they would slow the server down. * If you need to take long actions, use threads to offload them. * * Moreover, the fact that the notification is executed synchronously means - * that the notification code will be executed in the middle on Redis logic + * that the notification code will be executed in the middle of server logic * (commands logic, eviction, expire). Changing the key space while the logic * runs is dangerous and discouraged. In order to react to key space events with * write actions, please refer to `VM_AddPostNotificationJob`. @@ -8757,7 +8757,7 @@ void firePostExecutionUnitJobs(void) { /* When running inside a key space notification callback, it is dangerous and highly discouraged to perform any write * operation (See `VM_SubscribeToKeyspaceEvents`). In order to still perform write actions in this scenario, - * Redis provides `VM_AddPostNotificationJob` API. The API allows to register a job callback which Redis will call + * the server provides `VM_AddPostNotificationJob` API. The API allows to register a job callback which the server will call * when the following condition are promised to be fulfilled: * 1. It is safe to perform any write operation. * 2. The job will be called atomically along side the key space notification. @@ -8766,7 +8766,7 @@ void firePostExecutionUnitJobs(void) { * This raises a concerns of entering an infinite loops, we consider infinite loops * as a logical bug that need to be fixed in the module, an attempt to protect against * infinite loops by halting the execution could result in violation of the feature correctness - * and so Redis will make no attempt to protect the module from infinite loops. + * and so the server will make no attempt to protect the module from infinite loops. * * 'free_pd' can be NULL and in such case will not be used. * @@ -8978,8 +8978,8 @@ int VM_SendClusterMessage(ValkeyModuleCtx *ctx, const char *target_id, uint8_t t /* Return an array of string pointers, each string pointer points to a cluster * node ID of exactly VALKEYMODULE_NODE_ID_LEN bytes (without any null term). * The number of returned node IDs is stored into `*numnodes`. - * However if this function is called by a module not running an a Redis - * instance with Redis Cluster enabled, NULL is returned instead. + * However if this function is called by a module not running an an + * instance with Cluster enabled, NULL is returned instead. * * The IDs returned can be used with ValkeyModule_GetClusterNodeInfo() in order * to get more information about single node. @@ -9083,10 +9083,10 @@ int VM_GetClusterNodeInfo(ValkeyModuleCtx *ctx, const char *id, char *ip, char * return VALKEYMODULE_OK; } -/* Set Redis Cluster flags in order to change the normal behavior of - * Redis Cluster, especially with the goal of disabling certain functions. +/* Set Cluster flags in order to change the normal behavior of + * Cluster, especially with the goal of disabling certain functions. * This is useful for modules that use the Cluster API in order to create - * a different distributed system, but still want to use the Redis Cluster + * a different distributed system, but still want to use the Cluster * message bus. Flags that can be set: * * * CLUSTER_MODULE_FLAG_NO_FAILOVER @@ -9094,11 +9094,11 @@ int VM_GetClusterNodeInfo(ValkeyModuleCtx *ctx, const char *id, char *ip, char * * * With the following effects: * - * * NO_FAILOVER: prevent Redis Cluster slaves from failing over a dead master. + * * NO_FAILOVER: prevent Cluster slaves from failing over a dead master. * Also disables the replica migration feature. * * * NO_REDIRECTION: Every node will accept any key, without trying to perform - * partitioning according to the Redis Cluster algorithm. + * partitioning according to the Cluster algorithm. * Slots information will still be propagated across the * cluster, but without effect. */ void VM_SetClusterFlags(ValkeyModuleCtx *ctx, uint64_t flags) { @@ -9131,7 +9131,7 @@ const char *VM_ClusterCanonicalKeyNameInSlot(unsigned int slot) { * module timers subsystem in order to process the next event. * * All the timers are stored into a radix tree, ordered by expire time, when - * the main Redis event loop timer callback is called, we try to process all + * the main server event loop timer callback is called, we try to process all * the timers already expired one after the other. Then we re-enter the event * loop registering a timer that will expire when the next to process module * timer will expire. @@ -9377,7 +9377,7 @@ static void eventLoopCbWritable(struct aeEventLoop *ae, int fd, void *user_data, * On success VALKEYMODULE_OK is returned, otherwise * VALKEYMODULE_ERR is returned and errno is set to the following values: * - * * ERANGE: `fd` is negative or higher than `maxclients` Redis config. + * * ERANGE: `fd` is negative or higher than `maxclients` server config. * * EINVAL: `callback` is NULL or `mask` value is invalid. * * `errno` might take other values in case of an internal error. @@ -9452,7 +9452,7 @@ int VM_EventLoopAdd(int fd, int mask, ValkeyModuleEventLoopFunc func, void *user * On success VALKEYMODULE_OK is returned, otherwise * VALKEYMODULE_ERR is returned and errno is set to the following values: * - * * ERANGE: `fd` is negative or higher than `maxclients` Redis config. + * * ERANGE: `fd` is negative or higher than `maxclients` server config. * * EINVAL: `mask` value is invalid. */ int VM_EventLoopDel(int fd, int mask) { @@ -9478,7 +9478,7 @@ int VM_EventLoopDel(int fd, int mask) { return VALKEYMODULE_OK; } -/* This function can be called from other threads to trigger callback on Redis +/* This function can be called from other threads to trigger callback on the server * main thread. On success VALKEYMODULE_OK is returned. If `func` is NULL * VALKEYMODULE_ERR is returned and errno is set to EINVAL. */ @@ -9529,7 +9529,7 @@ static void eventLoopHandleOneShotEvents(void) { /* -------------------------------------------------------------------------- * ## Modules ACL API * - * Implements a hook into the authentication and authorization within Redis. + * Implements a hook into the authentication and authorization within the server. * --------------------------------------------------------------------------*/ /* This function is called when a client's user has changed and invokes the @@ -9588,7 +9588,7 @@ static void moduleFreeAuthenticatedClients(ValkeyModule *module) { } } -/* Creates a Redis ACL user that the module can use to authenticate a client. +/* Creates an ACL user that the module can use to authenticate a client. * After obtaining the user, the module should set what such user can do * using the VM_SetUserACL() function. Once configured, the user * can be used in order to authenticate a connection, with the specified @@ -9600,7 +9600,7 @@ static void moduleFreeAuthenticatedClients(ValkeyModule *module) { * * Users created here are not checked for duplicated name, so it's up to * the module calling this function to take care of not creating users * with the same name. - * * The created user can be used to authenticate multiple Redis connections. + * * The created user can be used to authenticate multiple connections. * * The caller can later free the user using the function * VM_FreeModuleUser(). When this function is called, if there are @@ -9628,7 +9628,7 @@ int VM_FreeModuleUser(ValkeyModuleUser *user) { return VALKEYMODULE_OK; } -/* Sets the permissions of a user created through the redis module +/* Sets the permissions of a user created through the module * interface. The syntax is the same as ACL SETUSER, so refer to the * documentation in acl.c for more information. See VM_CreateModuleUser * for detailed usage. @@ -9640,7 +9640,7 @@ int VM_SetModuleUserACL(ValkeyModuleUser *user, const char* acl) { } /* Sets the permission of a user with a complete ACL string, such as one - * would use on the redis ACL SETUSER command line API. This differs from + * would use on the ACL SETUSER command line API. This differs from * VM_SetModuleUserACL, which only takes single ACL operations at a time. * * Returns VALKEYMODULE_OK on success and VALKEYMODULE_ERR on failure @@ -9895,7 +9895,7 @@ static int authenticateClientWithUser(ValkeyModuleCtx *ctx, user *user, ValkeyMo } -/* Authenticate the current context's user with the provided redis acl user. +/* Authenticate the current context's user with the provided acl user. * Returns VALKEYMODULE_ERR if the user is disabled. * * See authenticateClientWithUser for information about callback, client_id, @@ -9904,7 +9904,7 @@ int VM_AuthenticateClientWithUser(ValkeyModuleCtx *ctx, ValkeyModuleUser *module return authenticateClientWithUser(ctx, module_user->user, callback, privdata, client_id); } -/* Authenticate the current context's user with the provided redis acl user. +/* Authenticate the current context's user with the provided acl user. * Returns VALKEYMODULE_ERR if the user is disabled or the user does not exist. * * See authenticateClientWithUser for information about callback, client_id, @@ -10717,11 +10717,11 @@ int moduleUnregisterFilters(ValkeyModule *module) { /* Register a new command filter function. * - * Command filtering makes it possible for modules to extend Redis by plugging + * Command filtering makes it possible for modules to extend the server by plugging * into the execution flow of all commands. * - * A registered filter gets called before Redis executes *any* command. This - * includes both core Redis commands and commands registered by any module. The + * A registered filter gets called before the server executes *any* command. This + * includes both core server commands and commands registered by any module. The * filter applies in all execution paths including: * * 1. Invocation by a client. @@ -10732,21 +10732,21 @@ int moduleUnregisterFilters(ValkeyModule *module) { * The filter executes in a special filter context, which is different and more * limited than a ValkeyModuleCtx. Because the filter affects any command, it * must be implemented in a very efficient way to reduce the performance impact - * on Redis. All Redis Module API calls that require a valid context (such as + * on the server. All Module API calls that require a valid context (such as * `ValkeyModule_Call()`, `ValkeyModule_OpenKey()`, etc.) are not supported in a * filter context. * * The `ValkeyModuleCommandFilterCtx` can be used to inspect or modify the - * executed command and its arguments. As the filter executes before Redis + * executed command and its arguments. As the filter executes before the server * begins processing the command, any change will affect the way the command is - * processed. For example, a module can override Redis commands this way: + * processed. For example, a module can override server commands this way: * * 1. Register a `MODULE.SET` command which implements an extended version of - * the Redis `SET` command. + * the `SET` command. * 2. Register a command filter which detects invocation of `SET` on a specific * pattern of keys. Once detected, the filter will replace the first * argument from `SET` to `MODULE.SET`. - * 3. When filter execution is complete, Redis considers the new command name + * 3. When filter execution is complete, the server considers the new command name * and therefore executes the module's own command. * * Note that in the above use case, if `MODULE.SET` itself uses @@ -10847,7 +10847,7 @@ ValkeyModuleString *VM_CommandFilterArgGet(ValkeyModuleCommandFilterCtx *fctx, i } /* Modify the filtered command by inserting a new argument at the specified - * position. The specified ValkeyModuleString argument may be used by Redis + * position. The specified ValkeyModuleString argument may be used by the server * after the filter context is destroyed, so it must not be auto-memory * allocated, freed or used elsewhere. */ @@ -10871,7 +10871,7 @@ int VM_CommandFilterArgInsert(ValkeyModuleCommandFilterCtx *fctx, int pos, Valke } /* Modify the filtered command by replacing an existing argument with a new one. - * The specified ValkeyModuleString argument may be used by Redis after the + * The specified ValkeyModuleString argument may be used by the server after the * filter context is destroyed, so it must not be auto-memory allocated, freed * or used elsewhere. */ @@ -10946,7 +10946,7 @@ size_t VM_MallocSizeDict(ValkeyModuleDict* dict) { } /* Return the a number between 0 to 1 indicating the amount of memory - * currently used, relative to the Redis "maxmemory" configuration. + * currently used, relative to the server "maxmemory" configuration. * * * 0 - No memory limit configured. * * Between 0 and 1 - The percentage of the memory used normalized in 0-1 range. @@ -11018,7 +11018,7 @@ void VM_ScanCursorDestroy(ValkeyModuleScanCursor *cursor) { * void scan_callback(ValkeyModuleCtx *ctx, ValkeyModuleString *keyname, * ValkeyModuleKey *key, void *privdata); * - * - `ctx`: the redis module context provided to for the scan. + * - `ctx`: the module context provided to for the scan. * - `keyname`: owned by the caller and need to be retained if used after this * function. * - `key`: holds info on the key and value, it is provided as best effort, in @@ -11051,7 +11051,7 @@ void VM_ScanCursorDestroy(ValkeyModuleScanCursor *cursor) { * * It is also possible to restart an existing cursor using VM_ScanCursorRestart. * - * IMPORTANT: This API is very similar to the Redis SCAN command from the + * IMPORTANT: This API is very similar to the SCAN command from the * point of view of the guarantees it provides. This means that the API * may report duplicated keys, but guarantees to report at least one time * every key that was there from the start to the end of the scanning process. @@ -11060,7 +11060,7 @@ void VM_ScanCursorDestroy(ValkeyModuleScanCursor *cursor) { * that the internal state of the database may change. For instance it is safe * to delete or modify the current key, but may not be safe to delete any * other key. - * Moreover playing with the Redis keyspace while iterating may have the + * Moreover playing with the keyspace while iterating may have the * effect of returning more duplicates. A safe pattern is to store the keys * names you want to modify elsewhere, and perform the actions on the keys * later when the iteration is complete. However this can cost a lot of @@ -11116,7 +11116,7 @@ static void moduleScanKeyCallback(void *privdata, const dictEntry *de) { * * void scan_callback(ValkeyModuleKey *key, ValkeyModuleString* field, ValkeyModuleString* value, void *privdata); * - * - key - the redis key context provided to for the scan. + * - key - the key context provided to for the scan. * - field - field name, owned by the caller and need to be retained if used * after this function. * - value - value string or NULL for set type, owned by the caller and need to @@ -11238,7 +11238,7 @@ int VM_ScanKey(ValkeyModuleKey *key, ValkeyModuleScanCursor *cursor, ValkeyModul /* Create a background child process with the current frozen snapshot of the * main process where you can do some processing in the background without * affecting / freezing the traffic and no need for threads and GIL locking. - * Note that Redis allows for only one concurrent fork. + * Note that the server allows for only one concurrent fork. * When the child wants to exit, it should call ValkeyModule_ExitFromChild. * If the parent wants to kill the child it should call ValkeyModule_KillForkChild * The done handler callback will be executed on the parent process when the @@ -11371,7 +11371,7 @@ static uint64_t moduleEventVersions[] = { * uint64_t subevent, * void *data); * - * The 'ctx' is a normal Redis module context that the callback can use in + * The 'ctx' is a normal module context that the callback can use in * order to call other modules APIs. The 'eid' is the event itself, this * is only useful in the case the module subscribed to multiple events: using * the 'id' field of this structure it is possible to check if the event @@ -11494,15 +11494,15 @@ static uint64_t moduleEventVersions[] = { * * `VALKEYMODULE_SUBEVENT_REPLICA_CHANGE_OFFLINE` * * No additional information is available so far: future versions - * of Redis will have an API in order to enumerate the replicas + * of the server will have an API in order to enumerate the replicas * connected and their state. * * * ValkeyModuleEvent_CronLoop * - * This event is called every time Redis calls the serverCron() + * This event is called every time the server calls the serverCron() * function in order to do certain bookkeeping. Modules that are * required to do operations from time to time may use this callback. - * Normally Redis calls this function 10 times per second, but + * Normally the server calls this function 10 times per second, but * this changes depending on the "hz" configuration. * No sub events are available. * @@ -11567,12 +11567,12 @@ static uint64_t moduleEventVersions[] = { * * * ValkeyModuleEvent_ReplBackup * - * WARNING: Replication Backup events are deprecated since Redis 7.0 and are never fired. + * WARNING: Replication Backup events are deprecated since Redis OSS 7.0 and are never fired. * See ValkeyModuleEvent_ReplAsyncLoad for understanding how Async Replication Loading events * are now triggered when repl-diskless-load is set to swapdb. * * Called when repl-diskless-load config is set to swapdb, - * And redis needs to backup the current database for the + * And the server needs to backup the current database for the * possibility to be restored later. A module with global data and * maybe with aux_load and aux_save callbacks may need to use this * notification to backup / restore / discard its globals. @@ -11586,7 +11586,7 @@ static uint64_t moduleEventVersions[] = { * * Called when repl-diskless-load config is set to swapdb and a replication with a master of same * data set history (matching replication ID) occurs. - * In which case redis serves current data set while loading new database in memory from socket. + * In which case the server serves current data set while loading new database in memory from socket. * Modules must have declared they support this mechanism in order to activate it, through * VALKEYMODULE_OPTIONS_HANDLE_REPL_ASYNC_LOAD flag. * The following sub events are available: @@ -11736,7 +11736,7 @@ typedef struct KeyInfo { int mode; } KeyInfo; -/* This is called by the Redis internals every time we want to fire an +/* This is called by the server internals every time we want to fire an * event that can be intercepted by some module. The pointer 'data' is useful * in order to populate the event-specific structure when needed, in order * to return the structure with more information to the callback. @@ -11963,7 +11963,7 @@ int moduleRegisterApi(const char *funcname, void *funcptr) { moduleRegisterApi("ValkeyModule_" #name, (void *)(unsigned long)VM_ ## name);\ moduleRegisterApi("RedisModule_" #name, (void *)(unsigned long)VM_ ## name);\ -/* Global initialization at Redis startup. */ +/* Global initialization at server startup. */ void moduleRegisterCoreAPI(void); /* Currently, this function is just a placeholder for the module system @@ -12002,11 +12002,11 @@ void moduleInitModulesSystem(void) { moduleRegisterCoreAPI(); - /* Create a pipe for module threads to be able to wake up the redis main thread. + /* Create a pipe for module threads to be able to wake up the server main thread. * Make the pipe non blocking. This is just a best effort aware mechanism * and we do not want to block not in the read nor in the write half. * Enable close-on-exec flag on pipes in case of the fork-exec system calls in - * sentinels or redis servers. */ + * sentinels or servers. */ if (anetPipe(server.module_pipe, O_CLOEXEC|O_NONBLOCK, O_CLOEXEC|O_NONBLOCK) == -1) { serverLog(LL_WARNING, "Can't create the pipe for module threads: %s", strerror(errno)); @@ -12337,7 +12337,7 @@ int moduleLoad(const char *path, void **module_argv, int module_argc, int is_loa return C_ERR; } - /* Redis module loaded! Register it. */ + /* Module loaded! Register it. */ dictAdd(modules,ctx.module->name,ctx.module); ctx.module->blocked_clients = 0; ctx.module->handle = handle; @@ -12808,11 +12808,11 @@ unsigned int maskModuleEnumConfigFlags(unsigned int flags) { return new_flags; } -/* Create a string config that Redis users can interact with via the Redis config file, +/* Create a string config that users can interact with via the server config file, * `CONFIG SET`, `CONFIG GET`, and `CONFIG REWRITE` commands. * * The actual config value is owned by the module, and the `getfn`, `setfn` and optional - * `applyfn` callbacks that are provided to Redis in order to access or manipulate the + * `applyfn` callbacks that are provided to the server in order to access or manipulate the * value. The `getfn` callback retrieves the value from the module, while the `setfn` * callback provides a value to be stored into the module config. * The optional `applyfn` callback is called after a `CONFIG SET` command modified one or @@ -12823,10 +12823,10 @@ unsigned int maskModuleEnumConfigFlags(unsigned int flags) { * are identical, and the callback will only be run once. * Both the `setfn` and `applyfn` can return an error if the provided value is invalid or * cannot be used. - * The config also declares a type for the value that is validated by Redis and + * The config also declares a type for the value that is validated by the server and * provided to the module. The config system provides the following types: * - * * Redis String: Binary safe string data. + * * String: Binary safe string data. * * Enum: One of a finite number of string tokens, provided during registration. * * Numeric: 64 bit signed integer, which also supports min and max values. * * Bool: Yes or no value. @@ -12834,7 +12834,7 @@ unsigned int maskModuleEnumConfigFlags(unsigned int flags) { * The `setfn` callback is expected to return VALKEYMODULE_OK when the value is successfully * applied. It can also return VALKEYMODULE_ERR if the value can't be applied, and the * *err pointer can be set with a ValkeyModuleString error message to provide to the client. - * This ValkeyModuleString will be freed by redis after returning from the set callback. + * This ValkeyModuleString will be freed by the server after returning from the set callback. * * All configs are registered with a name, a type, a default value, private data that is made * available in the callbacks, as well as several flags that modify the behavior of the config. @@ -12918,8 +12918,8 @@ int VM_RegisterBoolConfig(ValkeyModuleCtx *ctx, const char *name, int default_va * Create an enum config that server clients can interact with via the * `CONFIG SET`, `CONFIG GET`, and `CONFIG REWRITE` commands. * Enum configs are a set of string tokens to corresponding integer values, where - * the string value is exposed to Redis clients but the value passed Redis and the - * module is the integer value. These values are defined in enum_values, an array + * the string value is exposed to clients but the inter value is passed to the server + * and the module. These values are defined in enum_values, an array * of null-terminated c strings, and int_vals, an array of enum values who has an * index partner in enum_values. * Example Implementation: @@ -13129,7 +13129,7 @@ int VM_RdbSave(ValkeyModuleCtx *ctx, ValkeyModuleRdbStream *stream, int flags) { return VALKEYMODULE_OK; } -/* Redis MODULE command. +/* MODULE command. * * MODULE LIST * MODULE LOAD [args...] @@ -13268,7 +13268,7 @@ int VM_GetLFU(ValkeyModuleKey *key, long long *lfu_freq) { /** * Returns the full module options flags mask, using the return value * the module can check if a certain set of module options are supported - * by the redis server version in use. + * by the server version in use. * Example: * * int supportedFlags = VM_GetModuleOptionsAll(); @@ -13285,7 +13285,7 @@ int VM_GetModuleOptionsAll(void) { /** * Returns the full ContextFlags mask, using the return value * the module can check if a certain set of flags are supported - * by the redis server version in use. + * by the server version in use. * Example: * * int supportedFlags = VM_GetContextFlagsAll(); @@ -13302,7 +13302,7 @@ int VM_GetContextFlagsAll(void) { /** * Returns the full KeyspaceNotification mask, using the return value * the module can check if a certain set of flags are supported - * by the redis server version in use. + * by the server version in use. * Example: * * int supportedFlags = VM_GetKeyspaceNotificationFlagsAll(); @@ -13317,7 +13317,7 @@ int VM_GetKeyspaceNotificationFlagsAll(void) { } /** - * Return the redis version in format of 0x00MMmmpp. + * Return the server version in format of 0x00MMmmpp. * Example for 6.0.7 the return value will be 0x00060007. */ int VM_GetServerVersion(void) { @@ -13325,7 +13325,7 @@ int VM_GetServerVersion(void) { } /** - * Return the current redis-server runtime value of VALKEYMODULE_TYPE_METHOD_VERSION. + * Return the current server runtime value of VALKEYMODULE_TYPE_METHOD_VERSION. * You can use that when calling VM_CreateDataType to know which fields of * ValkeyModuleTypeMethods are gonna be supported and which will be ignored. */ @@ -13382,7 +13382,7 @@ int VM_ModuleTypeReplaceValue(ValkeyModuleKey *key, moduleType *mt, void *new_va * * ENOENT: Specified command does not exist. * * EINVAL: Invalid command arity specified. * - * NOTE: The returned array is not a Redis Module object so it does not + * NOTE: The returned array is not a Module object so it does not * get automatically freed even when auto-memory is used. The caller * must explicitly call VM_Free() to free it, same as the out_flags pointer if * used. @@ -13554,7 +13554,7 @@ void *VM_DefragAlloc(ValkeyModuleDefragCtx *ctx, void *ptr) { * Typically this means strings retained with VM_RetainString or VM_HoldString * may not be defragmentable. One exception is command argvs which, if retained * by the module, will end up with a single reference (because the reference - * on the Redis side is dropped as soon as the command callback returns). + * on the server side is dropped as soon as the command callback returns). */ ValkeyModuleString *VM_DefragValkeyModuleString(ValkeyModuleDefragCtx *ctx, ValkeyModuleString *str) { UNUSED(ctx); diff --git a/src/modules/helloacl.c b/src/modules/helloacl.c index a7660afea..282f1e6a8 100644 --- a/src/modules/helloacl.c +++ b/src/modules/helloacl.c @@ -154,8 +154,8 @@ int AuthAsyncCommand_RedisCommand(RedisModuleCtx *ctx, RedisModuleString **argv, return VALKEYMODULE_OK; } -/* This function must be present on each Redis module. It is used in order to - * register the commands into the Redis server. */ +/* This function must be present on each module. It is used in order to + * register the commands into the server. */ int RedisModule_OnLoad(RedisModuleCtx *ctx, RedisModuleString **argv, int argc) { VALKEYMODULE_NOT_USED(argv); VALKEYMODULE_NOT_USED(argc); diff --git a/src/modules/helloblock.c b/src/modules/helloblock.c index 8c036bead..7fd79cd36 100644 --- a/src/modules/helloblock.c +++ b/src/modules/helloblock.c @@ -198,8 +198,8 @@ int HelloKeys_RedisCommand(RedisModuleCtx *ctx, RedisModuleString **argv, int ar return VALKEYMODULE_OK; } -/* This function must be present on each Redis module. It is used in order to - * register the commands into the Redis server. */ +/* This function must be present on each module. It is used in order to + * register the commands into the server. */ int RedisModule_OnLoad(RedisModuleCtx *ctx, RedisModuleString **argv, int argc) { VALKEYMODULE_NOT_USED(argv); VALKEYMODULE_NOT_USED(argc); diff --git a/src/modules/hellocluster.c b/src/modules/hellocluster.c index 7a70332ad..e2c7ac57a 100644 --- a/src/modules/hellocluster.c +++ b/src/modules/hellocluster.c @@ -86,8 +86,8 @@ void PongReceiver(RedisModuleCtx *ctx, const char *sender_id, uint8_t type, cons type,VALKEYMODULE_NODE_ID_LEN,sender_id,(int)len, payload); } -/* This function must be present on each Redis module. It is used in order to - * register the commands into the Redis server. */ +/* This function must be present on each module. It is used in order to + * register the commands into the server. */ int RedisModule_OnLoad(RedisModuleCtx *ctx, RedisModuleString **argv, int argc) { VALKEYMODULE_NOT_USED(argv); VALKEYMODULE_NOT_USED(argc); @@ -103,7 +103,7 @@ int RedisModule_OnLoad(RedisModuleCtx *ctx, RedisModuleString **argv, int argc) ListCommand_RedisCommand,"readonly",0,0,0) == VALKEYMODULE_ERR) return VALKEYMODULE_ERR; - /* Disable Redis Cluster sharding and redirections. This way every node + /* Disable Cluster sharding and redirections. This way every node * will be able to access every possible key, regardless of the hash slot. * This way the PING message handler will be able to increment a specific * variable. Normally you do that in order for the distributed system diff --git a/src/modules/hellodict.c b/src/modules/hellodict.c index 6a6420b7d..98b69fd4e 100644 --- a/src/modules/hellodict.c +++ b/src/modules/hellodict.c @@ -1,7 +1,7 @@ /* Hellodict -- An example of modules dictionary API * * This module implements a volatile key-value store on top of the - * dictionary exported by the Redis modules API. + * dictionary exported by the modules API. * * ----------------------------------------------------------------------------- * @@ -103,8 +103,8 @@ int cmd_KEYRANGE(RedisModuleCtx *ctx, RedisModuleString **argv, int argc) { return VALKEYMODULE_OK; } -/* This function must be present on each Redis module. It is used in order to - * register the commands into the Redis server. */ +/* This function must be present on each module. It is used in order to + * register the commands into the server. */ int RedisModule_OnLoad(RedisModuleCtx *ctx, RedisModuleString **argv, int argc) { VALKEYMODULE_NOT_USED(argv); VALKEYMODULE_NOT_USED(argc); diff --git a/src/modules/hellohook.c b/src/modules/hellohook.c index 4b675891a..58e0995f6 100644 --- a/src/modules/hellohook.c +++ b/src/modules/hellohook.c @@ -75,8 +75,8 @@ void flushdbCallback(RedisModuleCtx *ctx, RedisModuleEvent e, uint64_t sub, void } } -/* This function must be present on each Redis module. It is used in order to - * register the commands into the Redis server. */ +/* This function must be present on each module. It is used in order to + * register the commands into the server. */ int RedisModule_OnLoad(RedisModuleCtx *ctx, RedisModuleString **argv, int argc) { VALKEYMODULE_NOT_USED(argv); VALKEYMODULE_NOT_USED(argc); diff --git a/src/modules/hellotimer.c b/src/modules/hellotimer.c index d0ea4e14a..ae76f084d 100644 --- a/src/modules/hellotimer.c +++ b/src/modules/hellotimer.c @@ -58,8 +58,8 @@ int TimerCommand_RedisCommand(RedisModuleCtx *ctx, RedisModuleString **argv, int return RedisModule_ReplyWithSimpleString(ctx, "OK"); } -/* This function must be present on each Redis module. It is used in order to - * register the commands into the Redis server. */ +/* This function must be present on each module. It is used in order to + * register the commands into the server. */ int RedisModule_OnLoad(RedisModuleCtx *ctx, RedisModuleString **argv, int argc) { VALKEYMODULE_NOT_USED(argv); VALKEYMODULE_NOT_USED(argc); diff --git a/src/modules/hellotype.c b/src/modules/hellotype.c index 31ca35f6f..b0329c6db 100644 --- a/src/modules/hellotype.c +++ b/src/modules/hellotype.c @@ -320,8 +320,8 @@ void HelloTypeDigest(RedisModuleDigest *md, void *value) { RedisModule_DigestEndSequence(md); } -/* This function must be present on each Redis module. It is used in order to - * register the commands into the Redis server. */ +/* This function must be present on each module. It is used in order to + * register the commands into the server. */ int RedisModule_OnLoad(RedisModuleCtx *ctx, RedisModuleString **argv, int argc) { VALKEYMODULE_NOT_USED(argv); VALKEYMODULE_NOT_USED(argc); diff --git a/src/modules/helloworld.c b/src/modules/helloworld.c index 658bcb392..8ca913732 100644 --- a/src/modules/helloworld.c +++ b/src/modules/helloworld.c @@ -1,4 +1,4 @@ -/* Helloworld module -- A few examples of the Redis Modules API in the form +/* Helloworld module -- A few examples of the Modules API in the form * of commands showing how to accomplish common tasks. * * This module does not do anything useful, if not for a few commands. The @@ -42,7 +42,7 @@ /* HELLO.SIMPLE is among the simplest commands you can implement. * It just returns the currently selected DB id, a functionality which is - * missing in Redis. The command uses two important API calls: one to + * missing in the server. The command uses two important API calls: one to * fetch the currently selected DB, the other in order to send the client * an integer reply as response. */ int HelloSimple_RedisCommand(RedisModuleCtx *ctx, RedisModuleString **argv, int argc) { @@ -73,8 +73,8 @@ int HelloPushNative_RedisCommand(RedisModuleCtx *ctx, RedisModuleString **argv, } /* HELLO.PUSH.CALL implements RPUSH using an higher level approach, calling - * a Redis command instead of working with the key in a low level way. This - * approach is useful when you need to call Redis commands that are not + * a command instead of working with the key in a low level way. This + * approach is useful when you need to call commands that are not * available as low level APIs, or when you don't need the maximum speed * possible but instead prefer implementation simplicity. */ int HelloPushCall_RedisCommand(RedisModuleCtx *ctx, RedisModuleString **argv, int argc) @@ -106,7 +106,7 @@ int HelloPushCall2_RedisCommand(RedisModuleCtx *ctx, RedisModuleString **argv, i } /* HELLO.LIST.SUM.LEN returns the total length of all the items inside - * a Redis list, by using the high level Call() API. + * a list, by using the high level Call() API. * This command is an example of the array reply access. */ int HelloListSumLen_RedisCommand(RedisModuleCtx *ctx, RedisModuleString **argv, int argc) { @@ -492,7 +492,7 @@ int HelloHCopy_RedisCommand(RedisModuleCtx *ctx, RedisModuleString **argv, int a * This is an implementation of the infamous LEFTPAD function, that * was at the center of an issue with the npm modules system in March 2016. * - * LEFTPAD is a good example of using a Redis Modules API called + * LEFTPAD is a good example of using a Modules API called * "pool allocator", that was a famous way to allocate memory in yet another * open source project, the Apache web server. * @@ -540,8 +540,8 @@ int HelloLeftPad_RedisCommand(RedisModuleCtx *ctx, RedisModuleString **argv, int return VALKEYMODULE_OK; } -/* This function must be present on each Redis module. It is used in order to - * register the commands into the Redis server. */ +/* This function must be present on each module. It is used in order to + * register the commands into the server. */ int RedisModule_OnLoad(RedisModuleCtx *ctx, RedisModuleString **argv, int argc) { if (RedisModule_Init(ctx,"helloworld",1,VALKEYMODULE_APIVER_1) == VALKEYMODULE_ERR) return VALKEYMODULE_ERR; diff --git a/src/monotonic.c b/src/monotonic.c index a78d9d5f9..d96bfb2b3 100644 --- a/src/monotonic.c +++ b/src/monotonic.c @@ -12,7 +12,7 @@ static char monotonic_info_string[32]; /* Using the processor clock (aka TSC on x86) can provide improved performance - * throughout Redis wherever the monotonic clock is used. The processor clock + * throughout the server wherever the monotonic clock is used. The processor clock * is significantly faster than calling 'clock_gettime' (POSIX). While this is * generally safe on modern systems, this link provides additional information * about use of the x86 TSC: http://oliveryang.net/2015/09/pitfalls-of-TSC-usage diff --git a/src/networking.c b/src/networking.c index fdfb9b3fd..2d94e532d 100644 --- a/src/networking.c +++ b/src/networking.c @@ -466,7 +466,7 @@ void addReplySds(client *c, sds s) { * client buffer, trying the static buffer initially, and using the string * of objects if not possible. * - * It is efficient because does not create an SDS object nor an Redis object + * It is efficient because does not create an SDS object nor an Object * if not needed. The object will only be created by calling * _addReplyProtoToList() if we fail to extend the existing tail object * in the list of objects. */ @@ -476,7 +476,7 @@ void addReplyProto(client *c, const char *s, size_t len) { } /* Low level function called by the addReplyError...() functions. - * It emits the protocol for a Redis error, in the form: + * It emits the protocol for an error reply, in the form: * * -ERRORCODE Error Message * @@ -543,7 +543,7 @@ void afterErrorReply(client *c, const char *s, size_t len, int flags) { * * Where the master must propagate the first change even if the second * will produce an error. However it is useful to log such events since - * they are rare and may hint at errors in a script or a bug in Redis. */ + * they are rare and may hint at errors in a script or a bug in the server. */ int ctype = getClientType(c); if (ctype == CLIENT_TYPE_MASTER || ctype == CLIENT_TYPE_SLAVE || c->id == CLIENT_ID_AOF) { char *to, *from; @@ -1042,7 +1042,7 @@ void addReplyBulkLen(client *c, robj *obj) { addReplyLongLongWithPrefix(c,len,'$'); } -/* Add a Redis Object as a bulk reply */ +/* Add an Object as a bulk reply */ void addReplyBulk(client *c, robj *obj) { addReplyBulkLen(c,obj); addReply(c,obj); @@ -1121,7 +1121,7 @@ void addReplyVerbatim(client *c, const char *s, size_t len, const char *ext) { /* This function is similar to the addReplyHelp function but adds the * ability to pass in two arrays of strings. Some commands have * some additional subcommands based on the specific feature implementation - * Redis is compiled with (currently just clustering). This function allows + * the server is compiled with (currently just clustering). This function allows * to pass is the common subcommands in `help` and any implementation * specific subcommands in `extended_help`. */ @@ -1729,7 +1729,7 @@ void freeClient(client *c) { void freeClientAsync(client *c) { /* We need to handle concurrent access to the server.clients_to_close list * only in the freeClientAsync() function, since it's the only function that - * may access the list while Redis uses I/O threads. All the other accesses + * may access the list while the server uses I/O threads. All the other accesses * are in the context of the main thread while the other threads are * idle. */ if (c->flags & CLIENT_CLOSE_ASAP || c->flags & CLIENT_SCRIPT) return; @@ -2195,7 +2195,7 @@ int processInlineBuffer(client *c) { c->repl_ack_time = server.unixtime; /* Masters should never send us inline protocol to run actual - * commands. If this happens, it is likely due to a bug in Redis where + * commands. If this happens, it is likely due to a bug in the server where * we got some desynchronization in the protocol, for example * because of a PSYNC gone bad. * @@ -2219,7 +2219,7 @@ int processInlineBuffer(client *c) { c->argv_len_sum = 0; } - /* Create redis objects for all arguments. */ + /* Create an Object for all arguments. */ for (c->argc = 0, j = 0; j < argc; j++) { c->argv[c->argc] = createObject(OBJ_STRING,argv[j]); c->argc++; @@ -2654,7 +2654,7 @@ void readQueryFromClient(connection *conn) { * buffer contains exactly the SDS string representing the object, even * at the risk of requiring more read(2) calls. This way the function * processMultiBulkBuffer() can avoid copying buffers to create the - * Redis Object representing the argument. */ + * robj representing the argument. */ if (c->reqtype == PROTO_REQ_MULTIBULK && c->multibulklen && c->bulklen != -1 && c->bulklen >= PROTO_MBULK_BIG_ARG) { @@ -2747,7 +2747,7 @@ done: beforeNextClient(c); } -/* A Redis "Address String" is a colon separated ip:port pair. +/* An "Address String" is a colon separated ip:port pair. * For IPv4 it's in the form x.y.z.k:port, example: "127.0.0.1:1234". * For IPv6 addresses we use [] around the IP part, like in "[::1]:1234". * For Unix sockets we use path:0, like in "/tmp/redis:0". @@ -3674,11 +3674,11 @@ void helloCommand(client *c) { /* This callback is bound to POST and "Host:" command names. Those are not * really commands, but are used in security attacks in order to talk to - * Redis instances via HTTP, with a technique called "cross protocol scripting" - * which exploits the fact that services like Redis will discard invalid + * instances via HTTP, with a technique called "cross protocol scripting" + * which exploits the fact that services like this server will discard invalid * HTTP headers and will process what follows. * - * As a protection against this attack, Redis will terminate the connection + * As a protection against this attack, the server will terminate the connection * when a POST or "Host:" header is seen, and will log the event from * time to time (to avoid creating a DOS as a result of too many logs). */ void securityWarningCommand(client *c) { @@ -3800,7 +3800,7 @@ void rewriteClientCommandArgument(client *c, int i, robj *newval) { } } -/* This function returns the number of bytes that Redis is +/* This function returns the number of bytes that the server is * using to store the reply still not read by the client. * * Note: this function is very fast so can be called as many time as @@ -4083,7 +4083,7 @@ static void pauseClientsByClient(mstime_t endTime, int isPauseClientAll) { * so that a failover without data loss to occur. Replicas will continue to receive * traffic to facilitate this functionality. * - * This function is also internally used by Redis Cluster for the manual + * This function is also internally used by Cluster for the manual * failover procedure implemented by CLUSTER FAILOVER. * * The function always succeed, even if there is already a pause in progress. @@ -4127,7 +4127,7 @@ uint32_t isPausedActionsWithUpdate(uint32_t actions_bitmask) { return (server.paused_actions & actions_bitmask); } -/* This function is called by Redis in order to process a few events from +/* This function is called by the server in order to process a few events from * time to time while blocked into some not interruptible operation. * This allows to reply to clients with the -LOADING error while loading the * data set at startup or after a full resynchronization with the master diff --git a/src/notify.c b/src/notify.c index 2881a48db..3bf6d5fc6 100644 --- a/src/notify.c +++ b/src/notify.c @@ -93,13 +93,13 @@ sds keyspaceEventsFlagsToString(int flags) { return res; } -/* The API provided to the rest of the Redis core is a simple function: +/* The API provided to the rest of the serer core is a simple function: * * notifyKeyspaceEvent(int type, char *event, robj *key, int dbid); * * 'type' is the notification class we define in `server.h`. * 'event' is a C string representing the event name. - * 'key' is a Redis object representing the key name. + * 'key' is an Object representing the key name. * 'dbid' is the database ID where the key lives. */ void notifyKeyspaceEvent(int type, char *event, robj *key, int dbid) { sds chan; diff --git a/src/object.c b/src/object.c index 8c00adbcb..a67f083a4 100644 --- a/src/object.c +++ b/src/object.c @@ -1,4 +1,4 @@ -/* Redis Object implementation. +/* Object implementation. * * Copyright (c) 2009-2012, Salvatore Sanfilippo * All rights reserved. @@ -173,7 +173,7 @@ robj *createStringObjectFromLongLong(long long value) { /* The function avoids returning a shared integer when LFU/LRU info * are needed, that is, when the object is used as a value in the key - * space(for instance when the INCR command is used), and Redis is + * space(for instance when the INCR command is used), and the server is * configured to evict based on LFU/LRU, so we want LFU/LRU values * specific for each key. */ robj *createStringObjectFromLongLongForValue(long long value) { @@ -649,7 +649,7 @@ robj *tryObjectEncodingEx(robj *o, int try_trim) { if (!sdsEncodedObject(o)) return o; /* It's not safe to encode shared objects: shared objects can be shared - * everywhere in the "object space" of Redis and may end in places where + * everywhere in the "object space" of the server and may end in places where * they are not handled. We handle them only as values in the keyspace. */ if (o->refcount > 1) return o; @@ -1296,7 +1296,7 @@ void inputCatSds(void *result, const char *str) { *info = sdscat(*info, str); } -/* This implements MEMORY DOCTOR. An human readable analysis of the Redis +/* This implements MEMORY DOCTOR. An human readable analysis of the server * memory condition. */ sds getMemoryDoctorReport(void) { int empty = 0; /* Instance is empty or almost empty. */ @@ -1425,7 +1425,7 @@ int objectSetLRUOrLFU(robj *val, long long lfu_freq, long long lru_idle, } } else if (lru_idle >= 0) { /* Provided LRU idle time is in seconds. Scale - * according to the LRU clock resolution this Redis + * according to the LRU clock resolution this * instance was compiled with (normally 1000 ms, so the * below statement will expand to lru_idle*1000/1000. */ lru_idle = lru_idle*lru_multiplier/LRU_CLOCK_RESOLUTION; @@ -1457,7 +1457,7 @@ robj *objectCommandLookupOrReply(client *c, robj *key, robj *reply) { return o; } -/* Object command allows to inspect the internals of a Redis Object. +/* Object command allows to inspect the internals of an Object. * Usage: OBJECT */ void objectCommand(client *c) { robj *o; @@ -1513,7 +1513,7 @@ NULL } /* The memory command will eventually be a complete interface for the - * memory introspection capabilities of Redis. + * memory introspection capabilities of the server. * * Usage: MEMORY usage */ void memoryCommand(client *c) { diff --git a/src/pqsort.c b/src/pqsort.c index fab54e026..ca4f99359 100644 --- a/src/pqsort.c +++ b/src/pqsort.c @@ -1,5 +1,5 @@ /* The following is the NetBSD libc qsort implementation modified in order to - * support partial sorting of ranges for Redis. + * support partial sorting of ranges. * * Copyright(C) 2009-2012 Salvatore Sanfilippo. All rights reserved. * diff --git a/src/pqsort.h b/src/pqsort.h index 824ab5c09..5f1c5c1cd 100644 --- a/src/pqsort.h +++ b/src/pqsort.h @@ -1,5 +1,5 @@ /* The following is the NetBSD libc qsort implementation modified in order to - * support partial sorting of ranges for Redis. + * support partial sorting of ranges. * * Copyright (c) 2009-2012, Salvatore Sanfilippo * All rights reserved. diff --git a/src/pubsub.c b/src/pubsub.c index b6db719b6..1fcad2565 100644 --- a/src/pubsub.c +++ b/src/pubsub.c @@ -100,7 +100,7 @@ pubsubtype pubSubShardType = { *----------------------------------------------------------------------------*/ /* Send a pubsub message of type "message" to the client. - * Normally 'msg' is a Redis object containing the string to send as + * Normally 'msg' is an Object containing the string to send as * message. However if the caller sets 'msg' as NULL, it will be able * to send a special message (for instance an Array type) by using the * addReply*() API family. */ @@ -315,7 +315,7 @@ int pubsubUnsubscribeChannel(client *c, robj *channel, int notify, pubsubtype ty if (dictSize(clients) == 0) { /* Free the dict and associated hash entry at all if this was * the latest client, so that it will be possible to abuse - * Redis PUBSUB creating millions of channels. */ + * PUBSUB creating millions of channels. */ kvstoreDictDelete(*type.serverPubSubChannels, slot, channel); } } diff --git a/src/rax.h b/src/rax.h index c58c28b2c..3604057d6 100644 --- a/src/rax.h +++ b/src/rax.h @@ -159,7 +159,7 @@ typedef struct raxStack { * This callback is used to perform very low level analysis of the radix tree * structure, scanning each possible node (but the root node), or in order to * reallocate the nodes to reduce the allocation fragmentation (this is the - * Redis application for this callback). + * server's application for this callback). * * This is currently only supported in forward iterations (raxNext) */ typedef int (*raxNodeCallback)(raxNode **noderef); diff --git a/src/rdb.c b/src/rdb.c index f35a41d8e..22dd658e1 100644 --- a/src/rdb.c +++ b/src/rdb.c @@ -127,7 +127,7 @@ int rdbLoadType(rio *rdb) { } /* This is only used to load old databases stored with the RDB_OPCODE_EXPIRETIME - * opcode. New versions of Redis store using the RDB_OPCODE_EXPIRETIME_MS + * opcode. New versions of the server store using the RDB_OPCODE_EXPIRETIME_MS * opcode. On error -1 is returned, however this could be a valid time, so * to check for loading errors the caller should call rioGetReadError() after * calling this function. */ @@ -144,13 +144,13 @@ ssize_t rdbSaveMillisecondTime(rio *rdb, long long t) { } /* This function loads a time from the RDB file. It gets the version of the - * RDB because, unfortunately, before Redis 5 (RDB version 9), the function + * RDB because, unfortunately, before Redis OSS 5 (RDB version 9), the function * failed to convert data to/from little endian, so RDB files with keys having * expires could not be shared between big endian and little endian systems * (because the expire time will be totally wrong). The fix for this is just * to call memrev64ifbe(), however if we fix this for all the RDB versions, * this call will introduce an incompatibility for big endian systems: - * after upgrading to Redis version 5 they will no longer be able to load their + * after upgrading to Redis OSS version 5 they will no longer be able to load their * own old RDB files. Because of that, we instead fix the function only for new * RDB versions, and load older RDB versions as we used to do in the past, * allowing big endian systems to load their own old RDB files. @@ -250,7 +250,7 @@ int rdbLoadLenByRef(rio *rdb, int *isencoded, uint64_t *lenptr) { /* This is like rdbLoadLenByRef() but directly returns the value read * from the RDB stream, signaling an error by returning RDB_LENERR - * (since it is a too large count to be applicable in any Redis data + * (since it is a too large count to be applicable in any server data * structure). */ uint64_t rdbLoadLen(rio *rdb, int *isencoded) { uint64_t len; @@ -490,7 +490,7 @@ ssize_t rdbSaveLongLongAsStringObject(rio *rdb, long long value) { return nwritten; } -/* Like rdbSaveRawString() gets a Redis object instead. */ +/* Like rdbSaveRawString() gets an Object instead. */ ssize_t rdbSaveStringObject(rio *rdb, robj *obj) { /* Avoid to decode the object, then encode it again, if the * object is already integer encoded. */ @@ -505,13 +505,13 @@ ssize_t rdbSaveStringObject(rio *rdb, robj *obj) { /* Load a string object from an RDB file according to flags: * * RDB_LOAD_NONE (no flags): load an RDB object, unencoded. - * RDB_LOAD_ENC: If the returned type is a Redis object, try to + * RDB_LOAD_ENC: If the returned type is an Object, try to * encode it in a special way to be more memory * efficient. When this flag is passed the function * no longer guarantees that obj->ptr is an SDS string. * RDB_LOAD_PLAIN: Return a plain string allocated with zmalloc() - * instead of a Redis object with an sds in it. - * RDB_LOAD_SDS: Return an SDS string instead of a Redis object. + * instead of an Object with an sds in it. + * RDB_LOAD_SDS: Return an SDS string instead of an Object. * * On I/O error NULL is returned. */ @@ -809,7 +809,7 @@ size_t rdbSaveStreamConsumers(rio *rdb, streamCG *cg) { return nwritten; } -/* Save a Redis object. +/* Save an Object. * Returns -1 on error, number of bytes written on success. */ ssize_t rdbSaveObject(rio *rdb, robj *o, robj *key, int dbid) { ssize_t n = 0, nwritten = 0; @@ -1377,7 +1377,7 @@ werr: } /* Produces a dump of the database in RDB format sending it to the specified - * Redis I/O channel. On success C_OK is returned, otherwise C_ERR + * I/O channel. On success C_OK is returned, otherwise C_ERR * is returned and part of the output, or all the output, can be * missing because of I/O errors. * @@ -1632,7 +1632,7 @@ void rdbRemoveTempFile(pid_t childpid, int from_signal) { /* This function is called by rdbLoadObject() when the code is in RDB-check * mode and we find a module value of type 2 that can be parsed without * the need of the actual module. The value is parsed for errors, finally - * a dummy redis object is returned just to conform to the API. */ + * a dummy Object is returned just to conform to the API. */ robj *rdbLoadCheckModuleValue(rio *rdb, char *modulename) { uint64_t opcode; while((opcode = rdbLoadLen(rdb,NULL)) != RDB_MODULE_OPCODE_EOF) { @@ -1830,7 +1830,7 @@ int lpValidateIntegrityAndDups(unsigned char *lp, size_t size, int deep, int pai return ret; } -/* Load a Redis object of the specified type from the specified file. +/* Load an Object of the specified type from the specified file. * On success a newly allocated object is returned, otherwise NULL. * When the function returns NULL and if 'error' is not NULL, the * integer pointed by 'error' is set to the type of error that occurred */ @@ -2277,7 +2277,7 @@ robj *rdbLoadObject(int rdbtype, rio *rdb, sds key, int dbid, int *error) { return NULL; } /* Convert to ziplist encoded hash. This must be deprecated - * when loading dumps created by Redis 2.4 gets deprecated. */ + * when loading dumps created by Redis OSS 2.4 gets deprecated. */ { unsigned char *lp = lpNew(0); unsigned char *zi = zipmapRewind(o->ptr); @@ -3196,7 +3196,7 @@ int rdbLoadRioWithLoadingCtx(rio *rdb, int rdbflags, rdbSaveInfo *rsi, rdbLoadin decrRefCount(auxval); continue; /* Read type again. */ } else if (type == RDB_OPCODE_MODULE_AUX) { - /* Load module data that is not related to the Redis key space. + /* Load module data that is not related to the server key space. * Such data can be potentially be stored both before and after the * RDB keys-values section. */ uint64_t moduleid = rdbLoadLen(rdb,NULL); @@ -3391,7 +3391,7 @@ int rdbLoadRioWithLoadingCtx(rio *rdb, int rdbflags, rdbSaveInfo *rsi, rdbLoadin return C_OK; /* Unexpected end of file is handled here calling rdbReportReadError(): - * this will in turn either abort Redis in most cases, or if we are loading + * this will in turn either abort the server in most cases, or if we are loading * the RDB file from a socket during initial SYNC (diskless replica mode), * we'll report the error to the caller, so that we can retry. */ eoferr: diff --git a/src/release.c b/src/release.c index fdc1dbd5b..a8b6fa188 100644 --- a/src/release.c +++ b/src/release.c @@ -27,7 +27,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ -/* Every time the Redis Git SHA1 or Dirty status changes only this small +/* Every time the Git SHA1 or Dirty status changes only this small * file is recompiled, as we access this information in all the other * files using this functions. */ diff --git a/src/replication.c b/src/replication.c index 5fb477cd8..f68c55098 100644 --- a/src/replication.c +++ b/src/replication.c @@ -233,7 +233,7 @@ int prepareReplicasToWrite(void) { return prepared; } -/* Wrapper for feedReplicationBuffer() that takes Redis string objects +/* Wrapper for feedReplicationBuffer() that takes string Objects * as input. */ void feedReplicationBufferWithObject(robj *o) { char llstr[LONG_STR_SIZE]; @@ -1030,7 +1030,7 @@ void syncCommand(client *c) { } } else { /* If a slave uses SYNC, we are dealing with an old implementation - * of the replication protocol (like redis-cli --slave). Flag the client + * of the replication protocol (like valkey-cli --slave). Flag the client * so that we don't expect to receive REPLCONF ACK feedbacks. */ c->flags |= CLIENT_PRE_PSYNC; } @@ -1142,7 +1142,7 @@ void syncCommand(client *c) { * * - listening-port * - ip-address - * What is the listening ip and port of the Replica redis instance, so that + * What is the listening ip and port of the Replica instance, so that * the master can accurately lists replicas and their listening ports in the * INFO output. * @@ -2038,7 +2038,7 @@ void readSyncBulkPayload(connection *conn) { /* We reach this point in one of the following cases: * * 1. The replica is using diskless replication, that is, it reads data - * directly from the socket to the Redis memory, without using + * directly from the socket to the server memory, without using * a temporary RDB file on disk. In that case we just block and * read everything from the socket. * @@ -2342,7 +2342,7 @@ char *sendCommand(connection *conn, ...) { size_t argslen = 0; char *arg; - /* Create the command to send to the master, we use redis binary + /* Create the command to send to the master, we use binary * protocol to make sure correct arguments are sent. This function * is not safe for all binary data. */ va_start(ap,conn); @@ -2665,7 +2665,7 @@ void syncWithMaster(connection *conn) { /* We accept only two replies as valid, a positive +PONG reply * (we just check for "+") or an authentication error. - * Note that older versions of Redis replied with "operation not + * Note that older versions of Redis OSS replied with "operation not * permitted" instead of using a proper error code, so we test * both. */ if (err[0] != '+' && @@ -2765,7 +2765,7 @@ void syncWithMaster(connection *conn) { if (server.repl_state == REPL_STATE_RECEIVE_PORT_REPLY) { err = receiveSynchronousResponse(conn); if (err == NULL) goto no_response_error; - /* Ignore the error if any, not all the Redis versions support + /* Ignore the error if any, not all the Redis OSS versions support * REPLCONF listening-port. */ if (err[0] == '-') { serverLog(LL_NOTICE,"(Non critical) Master does not understand " @@ -2783,7 +2783,7 @@ void syncWithMaster(connection *conn) { if (server.repl_state == REPL_STATE_RECEIVE_IP_REPLY) { err = receiveSynchronousResponse(conn); if (err == NULL) goto no_response_error; - /* Ignore the error if any, not all the Redis versions support + /* Ignore the error if any, not all the Redis OSS versions support * REPLCONF ip-address. */ if (err[0] == '-') { serverLog(LL_NOTICE,"(Non critical) Master does not understand " @@ -2798,7 +2798,7 @@ void syncWithMaster(connection *conn) { if (server.repl_state == REPL_STATE_RECEIVE_CAPA_REPLY) { err = receiveSynchronousResponse(conn); if (err == NULL) goto no_response_error; - /* Ignore the error if any, not all the Redis versions support + /* Ignore the error if any, not all the Redis OSS versions support * REPLCONF capa. */ if (err[0] == '-') { serverLog(LL_NOTICE,"(Non critical) Master does not understand " @@ -3465,9 +3465,9 @@ int checkGoodReplicasStatus(void) { } /* ----------------------- SYNCHRONOUS REPLICATION -------------------------- - * Redis synchronous replication design can be summarized in points: + * Synchronous replication design can be summarized in points: * - * - Redis masters have a global replication offset, used by PSYNC. + * - Masters have a global replication offset, used by PSYNC. * - Master increment the offset every time new commands are sent to slaves. * - Slaves ping back masters with the offset processed so far. * @@ -3777,7 +3777,7 @@ void replicationCron(void) { listLength(server.slaves)) { /* Note that we don't send the PING if the clients are paused during - * a Redis Cluster manual failover: the PING we send will otherwise + * a Cluster manual failover: the PING we send will otherwise * alter the replication offsets of master and slave, and will no longer * match the one stored into 'mf_master_offset' state. */ int manual_failover_in_progress = @@ -3895,7 +3895,7 @@ void replicationCron(void) { replicationStartPendingFork(); - /* Remove the RDB file used for replication if Redis is not running + /* Remove the RDB file used for replication if the server is not running * with any persistence. */ removeRDBUsedToSyncReplicas(); diff --git a/src/resp_parser.c b/src/resp_parser.c index b92a74cff..df96d78a8 100644 --- a/src/resp_parser.c +++ b/src/resp_parser.c @@ -49,7 +49,7 @@ * time of parsing. Callers may calculate it themselves after parsing the * entire collection. * - * NOTE: This parser is designed to only handle replies generated by Redis + * NOTE: This parser is designed to only handle replies generated by the server * itself. It does not perform many required validations and thus NOT SAFE FOR * PARSING USER INPUT. * ---------------------------------------------------------------------------------------- diff --git a/src/rio.c b/src/rio.c index eaf88d25f..9b1823e51 100644 --- a/src/rio.c +++ b/src/rio.c @@ -476,7 +476,7 @@ uint8_t rioCheckType(rio *r) { /* --------------------------- Higher level interface -------------------------- * * The following higher level functions use lower level rio.c functions to help - * generating the Redis protocol for the Append Only File. */ + * generating the RESP for the Append Only File. */ /* Write multi bulk count in the format: "*\r\n". */ size_t rioWriteBulkCount(rio *r, char prefix, long count) { diff --git a/src/script.c b/src/script.c index fd7c61671..db42e2f45 100644 --- a/src/script.c +++ b/src/script.c @@ -424,7 +424,7 @@ static int scriptVerifyClusterState(scriptRunCtx *run_ctx, client *c, client *or if (!server.cluster_enabled || mustObeyClient(original_c)) { return C_OK; } - /* If this is a Redis Cluster node, we need to make sure the script is not + /* If this is a Cluster node, we need to make sure the script is not * trying to access non-local keys, with the exception of commands * received from our master or when loading the AOF back in memory. */ int error_code; @@ -527,7 +527,7 @@ static int scriptVerifyAllowStale(client *c, sds *err) { return C_ERR; } -/* Call a Redis command. +/* Call a server command. * The reply is written to the run_ctx client and it is * up to the engine to take and parse. * The err out variable is set only if error occurs and describe the error. diff --git a/src/script.h b/src/script.h index caf95ef95..307eb41bd 100644 --- a/src/script.h +++ b/src/script.h @@ -32,9 +32,9 @@ /* * Script.c unit provides an API for functions and eval - * to interact with Redis. Interaction includes mostly + * to interact with the server. Interaction includes mostly * executing commands, but also functionalities like calling - * Redis back on long scripts or check if the script was killed. + * the server back on long scripts or check if the script was killed. * * The interaction is done using a scriptRunCtx object that * need to be created by the user and initialized using scriptPrepareForRun. @@ -44,7 +44,7 @@ * acl, cluster, read only run, ...) * 2. Set Resp * 3. Set Replication method (AOF/REPLICATION/NONE) - * 4. Call Redis back to on long running scripts to allow Redis reply + * 4. Call the server back to on long running scripts to allow the server reply * to clients and perform script kill */ diff --git a/src/script_lua.c b/src/script_lua.c index fbfc73eb9..24784c1d8 100644 --- a/src/script_lua.c +++ b/src/script_lua.c @@ -55,7 +55,7 @@ static char *libraries_allow_list[] = { NULL, }; -/* Redis Lua API globals */ +/* Lua API globals */ static char *redis_api_allow_list[] = { SERVER_API_NAME, REDIS_API_NAME, @@ -192,21 +192,21 @@ void* luaGetFromRegistry(lua_State* lua, const char* name) { } /* --------------------------------------------------------------------------- - * Redis reply to Lua type conversion functions. + * Server reply to Lua type conversion functions. * ------------------------------------------------------------------------- */ -/* Take a Redis reply in the Redis protocol format and convert it into a +/* Take a server reply in the RESP format and convert it into a * Lua type. Thanks to this function, and the introduction of not connected * clients, it is trivial to implement the redis() lua function. * - * Basically we take the arguments, execute the Redis command in the context + * Basically we take the arguments, execute the command in the context * of a non connected client, then take the generated reply and convert it * into a suitable Lua type. With this trick the scripting feature does not - * need the introduction of a full Redis internals API. The script + * need the introduction of a full server internals API. The script * is like a normal client that bypasses all the slow I/O paths. * * Note: in this function we do not do any sanity check as the reply is - * generated by Redis directly. This allows us to go faster. + * generated by the server directly. This allows us to go faster. * * Errors are returned as a table with a single 'err' field set to the * error string. @@ -536,7 +536,7 @@ void luaPushErrorBuff(lua_State *lua, sds err_buffer) { sds error_code; /* If debugging is active and in step mode, log errors resulting from - * Redis commands. */ + * server commands. */ if (ldbIsEnabled()) { ldbLog(sdscatprintf(sdsempty()," %s",err_buffer)); } @@ -563,8 +563,8 @@ void luaPushErrorBuff(lua_State *lua, sds err_buffer) { msg = err_buffer; error_code = sdsnew("ERR"); } - /* Trim newline at end of string. If we reuse the ready-made Redis error objects (case 1 above) then we might - * have a newline that needs to be trimmed. In any case the lua Redis error table shouldn't end with a newline. */ + /* Trim newline at end of string. If we reuse the ready-made error objects (case 1 above) then we might + * have a newline that needs to be trimmed. In any case the lua server error table shouldn't end with a newline. */ msg = sdstrim(msg, "\r\n"); sds final_msg = sdscatfmt(error_code, " %s", msg); @@ -591,11 +591,11 @@ int luaError(lua_State *lua) { /* --------------------------------------------------------------------------- - * Lua reply to Redis reply conversion functions. + * Lua reply to server reply conversion functions. * ------------------------------------------------------------------------- */ /* Reply to client 'c' converting the top element in the Lua stack to a - * Redis reply. As a side effect the element is consumed from the stack. */ + * server reply. As a side effect the element is consumed from the stack. */ static void luaReplyToRedisReply(client *c, client* script_client, lua_State *lua) { int t = lua_type(lua,-1); @@ -953,7 +953,7 @@ static int luaRedisGenericCommand(lua_State *lua, int raise_error) { goto cleanup; } - /* Convert the result of the Redis command into a suitable Lua type. + /* Convert the result of the command into a suitable Lua type. * The first thing we need is to create a single string from the client * output buffers. */ if (listLength(c->reply) == 0 && (size_t)c->bufpos < c->buf_usable_size) { @@ -976,7 +976,7 @@ static int luaRedisGenericCommand(lua_State *lua, int raise_error) { if (raise_error && reply[0] != '-') raise_error = 0; redisProtocolToLuaType(lua,reply); - /* If the debugger is active, log the reply from Redis. */ + /* If the debugger is active, log the reply from the server. */ if (ldbIsEnabled()) ldbLogRedisReply(reply); @@ -1004,9 +1004,9 @@ cleanup: /* Our implementation to lua pcall. * We need this implementation for backward - * comparability with older Redis versions. + * comparability with older Redis OSS versions. * - * On Redis 7, the error object is a table, + * On Redis OSS 7, the error object is a table, * compare to older version where the error * object is a string. To keep backward * comparability we catch the table object @@ -1062,7 +1062,7 @@ static int luaRedisSha1hexCommand(lua_State *lua) { /* Returns a table with a single field 'field' set to the string value * passed as argument. This helper function is handy when returning - * a Redis Protocol error or status reply from Lua: + * a RESP error or status reply from Lua: * * return redis.error_reply("ERR Some Error") * return redis.status_reply("ERR Some Error") @@ -1440,7 +1440,7 @@ void luaRegisterRedisAPI(lua_State* lua) { lua_pushcfunction(lua,luaRedisPcall); lua_setglobal(lua, "pcall"); - /* Register the redis commands table and fields */ + /* Register the commands table and fields */ lua_newtable(lua); /* redis.call */ @@ -1527,7 +1527,7 @@ void luaRegisterRedisAPI(lua_State* lua) { lua_setglobal(lua,"math"); } -/* Set an array of Redis String Objects as a Lua array (table) stored into a +/* Set an array of String Objects as a Lua array (table) stored into a * global variable. */ static void luaCreateArray(lua_State *lua, robj **elev, int elec) { int j; @@ -1540,7 +1540,7 @@ static void luaCreateArray(lua_State *lua, robj **elev, int elec) { } /* --------------------------------------------------------------------------- - * Redis provided math.random + * Custom provided math.random * ------------------------------------------------------------------------- */ /* We replace math.random() with our implementation that is not affected @@ -1735,7 +1735,7 @@ void luaCallFunction(scriptRunCtx* run_ctx, lua_State *lua, robj** keys, size_t } lua_pop(lua,1); /* Consume the Lua error */ } else { - /* On success convert the Lua return value into Redis protocol, and + /* On success convert the Lua return value into RESP, and * send it to * the client. */ luaReplyToRedisReply(c, run_ctx->c, lua); /* Convert and consume the reply. */ } diff --git a/src/script_lua.h b/src/script_lua.h index 07446725d..73210e6b3 100644 --- a/src/script_lua.h +++ b/src/script_lua.h @@ -38,10 +38,10 @@ * the top of the Lua stack. In addition, parsing the execution * result and convert it to the resp and reply to the client. * - * * Run Redis commands from within the Lua code (Including + * * Run server commands from within the Lua code (Including * parsing the reply and create a Lua object out of it). * - * * Register Redis API to the Lua interpreter. Only shared + * * Register the server API to the Lua interpreter. Only shared * API are registered (API that is only relevant on eval.c * (like debugging) are registered on eval.c). * diff --git a/src/sentinel.c b/src/sentinel.c index 24e8c3ded..ad2ebdd51 100644 --- a/src/sentinel.c +++ b/src/sentinel.c @@ -1,4 +1,4 @@ -/* Redis Sentinel implementation +/* Sentinel implementation * * Copyright (c) 2009-2012, Salvatore Sanfilippo * All rights reserved. @@ -60,7 +60,7 @@ typedef struct sentinelAddr { int port; } sentinelAddr; -/* A Sentinel Redis Instance object is monitoring. */ +/* A Sentinel Instance object is monitoring. */ #define SRI_MASTER (1<<0) #define SRI_SLAVE (1<<1) #define SRI_SENTINEL (1<<2) @@ -477,7 +477,7 @@ const char *preMonitorCfgName[] = { "announce-hostnames" }; -/* This function overwrites a few normal Redis config default with Sentinel +/* This function overwrites a few normal server config default with Sentinel * specific defaults. */ void initSentinelConfig(void) { server.port = REDIS_SENTINEL_PORT; @@ -617,7 +617,7 @@ int sentinelAddrEqualsHostname(sentinelAddr *a, char *hostname) { sentinel.resolve_hostnames ? ANET_NONE : ANET_IP_ONLY) == ANET_ERR) { /* If failed resolve then compare based on hostnames. That is our best effort as - * long as the server is unavailable for some reason. It is fine since Redis + * long as the server is unavailable for some reason. It is fine since an * instance cannot have multiple hostnames for a given setup */ return !strcasecmp(sentinel.resolve_hostnames ? a->hostname : a->ip, hostname); } @@ -649,7 +649,7 @@ sds announceSentinelAddrAndPort(const sentinelAddr *a) { * * 'type' is the message type, also used as a pub/sub channel name. * - * 'ri', is the redis instance target of this event if applicable, and is + * 'ri', is the server instance target of this event if applicable, and is * used to obtain the path of the notification script to execute. * * The remaining arguments are printf-alike. @@ -1260,7 +1260,7 @@ void sentinelDisconnectCallback(const redisAsyncContext *c, int status) { /* ========================== sentinelRedisInstance ========================= */ -/* Create a redis instance, the following fields must be populated by the +/* Create an instance of the server, the following fields must be populated by the * caller if needed: * runid: set to NULL but will be populated once INFO output is received. * info_refresh: is set to 0 to mean that we never received INFO so far. @@ -1406,7 +1406,7 @@ void releaseSentinelRedisInstance(sentinelRedisInstance *ri) { zfree(ri); } -/* Lookup a slave in a master Redis instance, by ip and port. */ +/* Lookup a slave in a master instance, by ip and port. */ sentinelRedisInstance *sentinelRedisInstanceLookupSlave( sentinelRedisInstance *ri, char *slave_addr, int port) { @@ -1696,7 +1696,7 @@ void sentinelPropagateDownAfterPeriod(sentinelRedisInstance *master) { } } -/* This function is used in order to send commands to Redis instances: the +/* This function is used in order to send commands to server instances: the * commands we send from Sentinel may be renamed, a common case is a master * with CONFIG and SLAVEOF commands renamed for security concerns. In that * case we check the ri->renamed_command table (or if the instance is a slave, @@ -2274,10 +2274,10 @@ void rewriteConfigSentinelOption(struct rewriteConfigState *state) { rewriteConfigMarkAsProcessed(state,"sentinel master-reboot-down-after-period"); } -/* This function uses the config rewriting Redis engine in order to persist +/* This function uses the config rewriting in order to persist * the state of the Sentinel in the current configuration file. * - * On failure the function logs a warning on the Redis log. */ + * On failure the function logs a warning on the server log. */ int sentinelFlushConfig(void) { int saved_hz = server.hz; int rewrite_status; @@ -2356,12 +2356,12 @@ void sentinelSendAuthIfNeeded(sentinelRedisInstance *ri, redisAsyncContext *c) { } } -/* Use CLIENT SETNAME to name the connection in the Redis instance as +/* Use CLIENT SETNAME to name the connection in the instance as * sentinel-- * The connection type is "cmd" or "pubsub" as specified by 'type'. * * This makes it possible to list all the sentinel instances connected - * to a Redis server with CLIENT LIST, grepping for a specific name format. */ + * to a server with CLIENT LIST, grepping for a specific name format. */ void sentinelSetClientName(sentinelRedisInstance *ri, redisAsyncContext *c, char *type) { char name[64]; @@ -2491,7 +2491,7 @@ void sentinelReconnectInstance(sentinelRedisInstance *ri) { link->disconnected = 0; } -/* ======================== Redis instances pinging ======================== */ +/* ======================== Server instances pinging ======================== */ /* Return true if master looks "sane", that is: * 1) It is actually a master in the current configuration. @@ -3002,7 +3002,7 @@ void sentinelReceiveHelloMessages(redisAsyncContext *c, void *reply, void *privd sentinelProcessHelloMessage(r->element[2]->str, r->element[2]->len); } -/* Send a "Hello" message via Pub/Sub to the specified 'ri' Redis +/* Send a "Hello" message via Pub/Sub to the specified 'ri' server * instance in order to broadcast the current configuration for this * master, and to advertise the existence of this Sentinel at the same time. * @@ -3071,7 +3071,7 @@ void sentinelForceHelloUpdateDictOfRedisInstances(dict *instances) { } /* This function forces the delivery of a "Hello" message (see - * sentinelSendHello() top comment for further information) to all the Redis + * sentinelSendHello() top comment for further information) to all the server * and Sentinel instances related to the specified 'master'. * * It is technically not needed since we send an update to every instance @@ -3395,7 +3395,7 @@ const char *sentinelFailoverStateStr(int state) { } } -/* Redis instance to Redis protocol representation. */ +/* Server instance to RESP representation. */ void addReplySentinelRedisInstance(client *c, sentinelRedisInstance *ri) { char *flags = sdsempty(); void *mbl; @@ -3800,7 +3800,7 @@ void addReplySentinelDebugInfo(client *c) { } /* Output a number of instances contained inside a dictionary as - * Redis protocol. */ + * RESP. */ void addReplyDictOfRedisInstances(client *c, dict *instances) { dictIterator *di; dictEntry *de; @@ -4868,7 +4868,7 @@ char *sentinelGetLeader(sentinelRedisInstance *master, uint64_t epoch) { /* Send SLAVEOF to the specified instance, always followed by a * CONFIG REWRITE command in order to store the new configuration on disk - * when possible (that is, if the Redis instance is recent enough to support + * when possible (that is, if the instance is recent enough to support * config rewriting, and if the server was started with a configuration file). * * If Host is NULL the function sends "SLAVEOF NO ONE". @@ -4920,9 +4920,9 @@ int sentinelSendSlaveOf(sentinelRedisInstance *ri, const sentinelAddr *addr) { if (retval == C_ERR) return retval; ri->link->pending_commands++; - /* CLIENT KILL TYPE is only supported starting from Redis 2.8.12, + /* CLIENT KILL TYPE is only supported starting from Redis OSS 2.8.12, * however sending it to an instance not understanding this command is not - * an issue because CLIENT is variadic command, so Redis will not + * an issue because CLIENT is variadic command, so the server will not * recognized as a syntax error, and the transaction will not fail (but * only the unsupported command will fail). */ for (int type = 0; type < 2; type++) { @@ -5048,7 +5048,7 @@ int compareSlavesForPromotion(const void *a, const void *b) { /* If the replication offset is the same select the slave with that has * the lexicographically smaller runid. Note that we try to handle runid - * == NULL as there are old Redis versions that don't publish runid in + * == NULL as there are old Redis OSS versions that don't publish runid in * INFO. A NULL runid is considered bigger than any other runid. */ sa_runid = (*sa)->runid; sb_runid = (*sb)->runid; @@ -5374,7 +5374,7 @@ void sentinelAbortFailover(sentinelRedisInstance *ri) { * in design. * -------------------------------------------------------------------------- */ -/* Perform scheduled operations for the specified Redis instance. */ +/* Perform scheduled operations for the specified instance. */ void sentinelHandleRedisInstance(sentinelRedisInstance *ri) { /* ========== MONITORING HALF ============ */ /* Every kind of instance */ @@ -5473,7 +5473,7 @@ void sentinelTimer(void) { sentinelCollectTerminatedScripts(); sentinelKillTimedoutScripts(); - /* We continuously change the frequency of the Redis "timer interrupt" + /* We continuously change the frequency of the server "timer interrupt" * in order to desynchronize every Sentinel from every other. * This non-determinism avoids that Sentinels started at the same time * exactly continue to stay synchronized asking to be voted at the diff --git a/src/server.c b/src/server.c index 756039a07..a6069c016 100644 --- a/src/server.c +++ b/src/server.c @@ -105,7 +105,7 @@ const char *replstateToString(int replstate); ((server.current_client && server.current_client->id == CLIENT_ID_AOF) ? 1 : 0) /* We use a private localtime implementation which is fork-safe. The logging - * function of Redis may be called from other threads. */ + * function of the server may be called from other threads. */ void nolocks_localtime(struct tm *tmp, time_t t, time_t tz, int dst); /* Low level logging. To use only for very big messages, otherwise @@ -201,7 +201,7 @@ err: * with LL_RAW flag only the msg is printed (with no new line at the end) * * We actually use this only for signals that are not fatal from the point - * of view of Redis. Signals that are going to kill the server anyway and + * of view of the server. Signals that are going to kill the server anyway and * where we need printf-alike features are served by serverLog(). */ void serverLogFromHandler(int level, const char *fmt, ...) { va_list ap; @@ -267,7 +267,7 @@ void exitFromChild(int retcode) { /*====================== Hash table type implementation ==================== */ /* This is a hash table type that uses the SDS dynamic strings library as - * keys and redis objects as values (objects can hold SDS strings, + * keys and Objects as values (Objects can hold SDS strings, * lists, sets). */ void dictVanillaFree(dict *d, void *val) @@ -423,10 +423,10 @@ uint64_t dictEncObjHash(const void *key) { } /* Return 1 if currently we allow dict to expand. Dict may allocate huge - * memory to contain hash buckets when dict expands, that may lead redis - * rejects user's requests or evicts some keys, we can stop dict to expand + * memory to contain hash buckets when dict expands, that may lead the server to + * reject user's requests or evict some keys, we can stop dict to expand * provisionally if used memory will be over maxmemory after dict expands, - * but to guarantee the performance of redis, we still allow dict to expand + * but to guarantee the performance of the server, we still allow dict to expand * if dict load factor exceeds HASHTABLE_MAX_LOAD_FACTOR. */ int dictResizeAllowed(size_t moreMem, double usedRatio) { /* for debug purposes: dict is not allowed to be resized. */ @@ -439,7 +439,7 @@ int dictResizeAllowed(size_t moreMem, double usedRatio) { } } -/* Generic hash table type where keys are Redis Objects, Values +/* Generic hash table type where keys are Objects, Values * dummy pointers. */ dictType objectKeyPointerValueDictType = { dictEncObjHash, /* hash function */ @@ -487,7 +487,7 @@ dictType zsetDictType = { NULL, /* allow to expand */ }; -/* Db->dict, keys are sds strings, vals are Redis objects. */ +/* Db->dict, keys are sds strings, vals are Objects. */ dictType dbDictType = { dictSdsHash, /* hash function */ NULL, /* key dup */ @@ -542,7 +542,7 @@ dictType sdsReplyDictType = { NULL /* allow to expand */ }; -/* Keylist hash table type has unencoded redis objects as keys and +/* Keylist hash table type has unencoded Objects as keys and * lists as values. It's used for blocking operations (BLPOP) and to * map swapped keys to a list of clients waiting for this keys to be loaded. */ dictType keylistDictType = { @@ -555,7 +555,7 @@ dictType keylistDictType = { NULL /* allow to expand */ }; -/* KeyDict hash table type has unencoded redis objects as keys and +/* KeyDict hash table type has unencoded Objects as keys and * dicts as values. It's used for PUBSUB command to track clients subscribing the channels. */ dictType objToDictDictType = { dictObjHash, /* hash function */ @@ -979,7 +979,7 @@ void getExpansiveClientsInfo(size_t *in_usage, size_t *out_usage) { * commands. * * It is very important for this function, and the functions it calls, to be - * very fast: sometimes Redis has tens of hundreds of connected clients, and the + * very fast: sometimes the server has tens of hundreds of connected clients, and the * default server.hz value is 10, so sometimes here we need to process thousands * of clients per second, turning this function into a source of latency. */ @@ -1050,7 +1050,7 @@ void clientsCron(void) { } /* This function handles 'background' operations we are required to do - * incrementally in Redis databases, such as active key expiring, resizing, + * incrementally in the databases, such as active key expiring, resizing, * rehashing. */ void databasesCron(void) { /* Expire keys by random sampling. Not required for slaves @@ -1326,7 +1326,7 @@ int serverCron(struct aeEventLoop *eventLoop, long long id, void *clientData) { * * Note that even if the counter wraps it's not a big problem, * everything will still work but some object will appear younger - * to Redis. However for this to happen a given object should never be + * to the server. However for this to happen a given object should never be * touched for all the time needed to the counter to wrap, which is * not likely. * @@ -1383,7 +1383,7 @@ int serverCron(struct aeEventLoop *eventLoop, long long id, void *clientData) { /* We need to do a few operations on clients asynchronously. */ clientsCron(); - /* Handle background operations on Redis databases. */ + /* Handle background operations on databases. */ databasesCron(); /* Start a scheduled AOF rewrite if this was requested by the user while @@ -1470,7 +1470,7 @@ int serverCron(struct aeEventLoop *eventLoop, long long id, void *clientData) { /* Replication cron function -- used to reconnect to master, * detect transfer failures, start background RDB transfers and so forth. * - * If Redis is trying to failover then run the replication cron faster so + * If the server is trying to failover then run the replication cron faster so * progress on the handshake happens more quickly. */ if (server.failover_state != NO_FAILOVER) { run_with_period(100) replicationCron(); @@ -1478,7 +1478,7 @@ int serverCron(struct aeEventLoop *eventLoop, long long id, void *clientData) { run_with_period(1000) replicationCron(); } - /* Run the Redis Cluster cron. */ + /* Run the Cluster cron. */ run_with_period(100) { if (server.cluster_enabled) clusterCron(); } @@ -1617,7 +1617,7 @@ static void sendGetackToReplicas(void) { extern int ProcessingEventsWhileBlocked; -/* This function gets called every time Redis is entering the +/* This function gets called every time the server is entering the * main loop of the event driven library, that is, before to sleep * for ready file descriptors. * @@ -1664,8 +1664,8 @@ void beforeSleep(struct aeEventLoop *eventLoop) { /* If any connection type(typical TLS) still has pending unread data don't sleep at all. */ int dont_sleep = connTypeHasPendingData(); - /* Call the Redis Cluster before sleep function. Note that this function - * may change the state of Redis Cluster (from ok to fail or vice versa), + /* Call the Cluster before sleep function. Note that this function + * may change the state of Cluster (from ok to fail or vice versa), * so it's a good idea to call it before serving the unblocked clients * later in this function, must be done before blockedBeforeSleep. */ if (server.cluster_enabled) clusterBeforeSleep(); @@ -1791,7 +1791,7 @@ void beforeSleep(struct aeEventLoop *eventLoop) { aeSetDontWait(server.el, dont_sleep); /* Before we are going to sleep, let the threads access the dataset by - * releasing the GIL. Redis main thread will not touch anything at this + * releasing the GIL. The server main thread will not touch anything at this * time. */ if (moduleCount()) moduleReleaseGIL(); /********************* WARNING ******************** @@ -1800,7 +1800,7 @@ void beforeSleep(struct aeEventLoop *eventLoop) { } /* This function is called immediately after the event loop multiplexing - * API returned, and the control is going to soon return to Redis by invoking + * API returned, and the control is going to soon return to the server by invoking * the different events callbacks. */ void afterSleep(struct aeEventLoop *eventLoop) { UNUSED(eventLoop); @@ -2198,7 +2198,7 @@ int restartServer(int flags, mstime_t delay) { } /* Close all file descriptors, with the exception of stdin, stdout, stderr - * which are useful if we restart a Redis server which is not daemonized. */ + * which are useful if we restart a server which is not daemonized. */ for (j = 3; j < (int)server.maxclients + 1024; j++) { /* Test the descriptor validity before closing it, otherwise * Valgrind issues a warning on close(). */ @@ -2231,7 +2231,7 @@ int setOOMScoreAdj(int process_class) { serverAssert(process_class >= 0 && process_class < CONFIG_OOM_COUNT); #ifdef HAVE_PROC_OOM_SCORE_ADJ - /* The following statics are used to indicate Redis has changed the process's oom score. + /* The following statics are used to indicate the server has changed the process's oom score. * And to save the original score so we can restore it later if needed. * We need this so when we disabled oom-score-adj (also during configuration rollback * when another configuration parameter was invalid and causes a rollback after @@ -2247,7 +2247,7 @@ int setOOMScoreAdj(int process_class) { if (server.oom_score_adj != OOM_SCORE_ADJ_NO) { if (!oom_score_adjusted_by_redis) { oom_score_adjusted_by_redis = 1; - /* Backup base value before enabling Redis control over oom score */ + /* Backup base value before enabling the server control over oom score */ fd = open("/proc/self/oom_score_adj", O_RDONLY); if (fd < 0 || read(fd, buf, sizeof(buf)) < 0) { serverLog(LL_WARNING, "Unable to read oom_score_adj: %s", strerror(errno)); @@ -2449,7 +2449,7 @@ int createSocketAcceptHandler(connListener *sfd, aeFileProc *accept_handler) { } /* Initialize a set of file descriptors to listen to the specified 'port' - * binding the addresses specified in the Redis server configuration. + * binding the addresses specified in the server configuration. * * The listening file descriptors are stored in the integer array 'fds' * and their number is set in '*count'. Actually @sfd should be 'listener', @@ -2657,7 +2657,7 @@ void initServer(void) { } server.db = zmalloc(sizeof(server)*server.dbnum); - /* Create the Redis databases, and initialize other internal state. */ + /* Create the databases, and initialize other internal state. */ int slot_count_bits = 0; int flags = KVSTORE_ALLOCATE_DICTS_ON_DEMAND; if (server.cluster_enabled) { @@ -2768,7 +2768,7 @@ void initServer(void) { /* 32 bit instances are limited to 4GB of address space, so if there is * no explicit limit in the user provided configuration we set a limit * at 3 GB using maxmemory with 'noeviction' policy'. This avoids - * useless crashes of the Redis instance for out of memory. */ + * useless crashes of the instance for out of memory. */ if (server.arch_bits == 32 && server.maxmemory == 0) { serverLog(LL_WARNING,"Warning: 32 bit instance detected but no memory limit set. Setting 3 GB maxmemory limit with 'noeviction' policy now."); server.maxmemory = 3072LL*(1024*1024); /* 3 GB */ @@ -2893,7 +2893,7 @@ void InitServerLast(void) { * 3. The order of the range specs must be ascending (i.e. * lastkey of spec[i] == firstkey-1 of spec[i+1]). * - * This function will succeed on all native Redis commands and may + * This function will succeed on all native commands and may * fail on module commands, even if it only has "range" specs that * could actually be "glued", in the following cases: * 1. The order of "range" specs is not ascending (e.g. the spec for @@ -2910,7 +2910,7 @@ void populateCommandLegacyRangeSpec(struct serverCommand *c) { memset(&c->legacy_range_key_spec, 0, sizeof(c->legacy_range_key_spec)); /* Set the movablekeys flag if we have a GETKEYS flag for modules. - * Note that for native redis commands, we always have keyspecs, + * Note that for native commands, we always have keyspecs, * with enough information to rely on for movablekeys. */ if (c->flags & CMD_MODULE_GETKEYS) c->flags |= CMD_MOVABLE_KEYS; @@ -3062,7 +3062,7 @@ int populateCommandStructure(struct serverCommand *c) { extern struct serverCommand serverCommandTable[]; -/* Populates the Redis Command Table dict from the static table in commands.c +/* Populates the Command Table dict from the static table in commands.c * which is auto generated from the json files in the commands folder. */ void populateCommandTable(void) { int j; @@ -3115,7 +3115,7 @@ void resetErrorTableStats(void) { server.errors_enabled = 1; } -/* ========================== Redis OP Array API ============================ */ +/* ========================== OP Array API ============================ */ int serverOpArrayAppend(serverOpArray *oa, int dbid, robj **argv, int argc, int target) { serverOp *op; @@ -3303,8 +3303,8 @@ static void propagateNow(int dbid, robj **argv, int argc, int target) { * after the current command is propagated to AOF / Replication. * * dbid is the database ID the command should be propagated into. - * Arguments of the command to propagate are passed as an array of redis - * objects pointers of len 'argc', using the 'argv' vector. + * Arguments of the command to propagate are passed as an array of + * Objects pointers of len 'argc', using the 'argv' vector. * * The function does not take a reference to the passed 'argv' vector, * so it is up to the caller to release the passed argv (but it is usually @@ -3326,7 +3326,7 @@ void alsoPropagate(int dbid, robj **argv, int argc, int target) { } /* It is possible to call the function forceCommandPropagation() inside a - * Redis command implementation in order to to force the propagation of a + * command implementation in order to to force the propagation of a * specific command execution into AOF / Replication. */ void forceCommandPropagation(client *c, int flags) { serverAssert(c->cmd->flags & (CMD_WRITE | CMD_MAY_REPLICATE)); @@ -3424,7 +3424,7 @@ static void propagatePendingCommands(void) { /* Performs operations that should be performed after an execution unit ends. * Execution unit is a code that should be done atomically. - * Execution units can be nested and are not necessarily starts with Redis command. + * Execution units can be nested and do not necessarily start with a server command. * * For example the following is a logical unit: * active expire -> @@ -3478,7 +3478,7 @@ int incrCommandStatsOnError(struct serverCommand *cmd, int flags) { return res; } -/* Call() is the core of Redis execution of a command. +/* Call() is the core of the server's execution of a command. * * The following flags can be passed: * CMD_CALL_NONE No flags. @@ -3534,7 +3534,7 @@ void call(client *c, int flags) { * demand, and initialize the array for additional commands propagation. */ c->flags &= ~(CLIENT_FORCE_AOF|CLIENT_FORCE_REPL|CLIENT_PREVENT_PROP); - /* Redis core is in charge of propagation when the first entry point + /* The server core is in charge of propagation when the first entry point * of call() is processCommand(). * The only other option to get to call() without having processCommand * as an entry point is if a module triggers RM_Call outside of call() @@ -4432,7 +4432,7 @@ int finishShutdown(void) { * doing it's cleanup, but in this case this code will not be reached, * so we need to call rdbRemoveTempFile which will close fd(in order * to unlink file actually) in background thread. - * The temp rdb file fd may won't be closed when redis exits quickly, + * The temp rdb file fd may won't be closed when the server exits quickly, * but OS will close this fd when process exits. */ rdbRemoveTempFile(server.child_pid, 0); } @@ -4484,7 +4484,7 @@ int finishShutdown(void) { if (rdbSave(SLAVE_REQ_NONE,server.rdb_filename,rsiptr,RDBFLAGS_KEEP_CACHE) != C_OK) { /* Ooops.. error saving! The best we can do is to continue * operating. Note that if there was a background saving process, - * in the next cron() Redis will be notified that the background + * in the next cron() the server will be notified that the background * saving aborted, handling special stuff like slaves pending for * synchronization... */ if (force) { @@ -4537,8 +4537,8 @@ error: /*================================== Commands =============================== */ -/* Sometimes Redis cannot accept write commands because there is a persistence - * error with the RDB or AOF file, and Redis is configured in order to stop +/* Sometimes the server cannot accept write commands because there is a persistence + * error with the RDB or AOF file, and the server is configured in order to stop * accepting writes in such situation. This function returns if such a * condition is active, and the type of the condition. * @@ -4952,7 +4952,7 @@ void addReplyCommandSubCommands(client *c, struct serverCommand *cmd, void (*rep dictReleaseIterator(di); } -/* Output the representation of a Redis command. Used by the COMMAND command and COMMAND INFO. */ +/* Output the representation of a server command. Used by the COMMAND command and COMMAND INFO. */ void addReplyCommandInfo(client *c, struct serverCommand *cmd) { if (!cmd) { addReplyNull(c); @@ -4980,7 +4980,7 @@ void addReplyCommandInfo(client *c, struct serverCommand *cmd) { } } -/* Output the representation of a Redis command. Used by the COMMAND DOCS. */ +/* Output the representation of a server command. Used by the COMMAND DOCS. */ void addReplyCommandDocs(client *c, struct serverCommand *cmd) { /* Count our reply len so we don't have to use deferred reply. */ long maplen = 1; @@ -6253,7 +6253,7 @@ void daemonize(void) { if (fork() != 0) exit(0); /* parent exits */ setsid(); /* create a new session */ - /* Every output goes to /dev/null. If Redis is daemonized but + /* Every output goes to /dev/null. If the server is daemonized but * the 'logfile' is set to 'stdout' in the configuration file * it will not log at all. */ if ((fd = open("/dev/null", O_RDWR, 0)) != -1) { @@ -6994,8 +6994,8 @@ int main(int argc, char **argv) { initSentinel(); } - /* Check if we need to start in redis-check-rdb/aof mode. We just execute - * the program main. However the program is part of the Redis executable + /* Check if we need to start in valkey-check-rdb/aof mode. We just execute + * the program main. However the program is part of the server executable * so that we can easily execute an RDB check on loading errors. */ if (strstr(exec_name,"valkey-check-rdb") != NULL) redis_check_rdb_main(argc,argv,NULL); diff --git a/src/server.h b/src/server.h index 0ca24e3c9..d891fccfb 100644 --- a/src/server.h +++ b/src/server.h @@ -82,9 +82,9 @@ typedef long long ustime_t; /* microsecond time type. */ #define VALKEYMODULE_CORE 1 typedef struct serverObject robj; -#include "valkeymodule.h" /* Redis modules API defines. */ +#include "valkeymodule.h" /* Modules API defines. */ -/* Following includes allow test functions to be called from Redis main() */ +/* Following includes allow test functions to be called from main() */ #include "zipmap.h" #include "ziplist.h" /* Compact list data structure */ #include "sha1.h" @@ -225,7 +225,7 @@ extern int configOOMScoreAdjValuesDefaults[CONFIG_OOM_COUNT]; #define CMD_NO_MANDATORY_KEYS (1ULL<<19) #define CMD_PROTECTED (1ULL<<20) #define CMD_MODULE_GETKEYS (1ULL<<21) /* Use the modules getkeys interface. */ -#define CMD_MODULE_NO_CLUSTER (1ULL<<22) /* Deny on Redis Cluster. */ +#define CMD_MODULE_NO_CLUSTER (1ULL<<22) /* Deny on Cluster. */ #define CMD_NO_ASYNC_LOADING (1ULL<<23) #define CMD_NO_MULTI (1ULL<<24) #define CMD_MOVABLE_KEYS (1ULL<<25) /* The legacy range spec doesn't cover all keys. @@ -560,7 +560,7 @@ typedef enum { #define OOM_SCORE_RELATIVE 1 #define OOM_SCORE_ADJ_ABSOLUTE 2 -/* Redis maxmemory strategies. Instead of using just incremental number +/* Server maxmemory strategies. Instead of using just incremental number * for this defines, we use a set of flags so that testing for certain * properties common to multiple policies is faster. */ #define MAXMEMORY_FLAG_LRU (1<<0) @@ -699,9 +699,9 @@ typedef enum { * Data types *----------------------------------------------------------------------------*/ -/* A redis object, that is a type able to hold a string / list / set */ +/* An Object, that is a type able to hold a string / list / set */ -/* The actual Redis Object */ +/* The actual Object */ #define OBJ_STRING 0 /* String object. */ #define OBJ_LIST 1 /* List object. */ #define OBJ_SET 2 /* Set object. */ @@ -709,7 +709,7 @@ typedef enum { #define OBJ_HASH 4 /* Hash object. */ /* The "module" object type is a special one that signals that the object - * is one directly managed by a Redis module. In this case the value points + * is one directly managed by a module. In this case the value points * to a moduleValue struct, which contains the object value (which is only * handled by the module itself) and the ValkeyModuleType struct which lists * function pointers in order to serialize, deserialize, AOF-rewrite and @@ -792,7 +792,7 @@ typedef struct ValkeyModuleType { char name[10]; /* 9 bytes name + null term. Charset: A-Z a-z 0-9 _- */ } moduleType; -/* In Redis objects 'robj' structures of type OBJ_MODULE, the value pointer +/* In Object 'robj' structures of type OBJ_MODULE, the value pointer * is set to the following structure, referencing the moduleType structure * in order to work with the value, and at the same time providing a raw * pointer to the value, as created by the module commands operating with @@ -837,7 +837,7 @@ struct ValkeyModule { }; typedef struct ValkeyModule ValkeyModule; -/* This is a wrapper for the 'rio' streams used inside rdb.c in Redis, so that +/* This is a wrapper for the 'rio' streams used inside rdb.c in the server, so that * the user does not have to take the total count of the written bytes nor * to care about error conditions. */ struct ValkeyModuleIO { @@ -865,7 +865,7 @@ struct ValkeyModuleIO { iovar.pre_flush_buffer = NULL; \ } while(0) -/* This is a structure used to export DEBUG DIGEST capabilities to Redis +/* This is a structure used to export DEBUG DIGEST capabilities to * modules. We want to capture both the ordered and unordered elements of * a data structure, so that a digest can be created in a way that correctly * reflects the values. See the DEBUG DIGEST command implementation for more @@ -924,7 +924,7 @@ struct serverObject { * and Module types have their registered name returned. */ char *getObjectTypeName(robj*); -/* Macro used to initialize a Redis object allocated on the stack. +/* Macro used to initialize an Object allocated on the stack. * Note that this macro is taken near the structure definition to make sure * we'll update it when the structure is changed, to avoid bugs like * bug #85 introduced exactly in this way. */ @@ -971,7 +971,7 @@ typedef struct replBufBlock { char buf[]; } replBufBlock; -/* Redis database representation. There are multiple databases identified +/* Database representation. There are multiple databases identified * by integers from 0 (the default database) up to the max configured * database. The database number is the 'id' field in the structure. */ typedef struct serverDb { @@ -1058,7 +1058,7 @@ typedef struct blockingState { * After the execution of every command or script, we iterate over this list to check * if as a result we should serve data to clients blocked, unblocking them. * Note that server.ready_keys will not have duplicates as there dictionary - * also called ready_keys in every structure representing a Redis database, + * also called ready_keys in every structure representing a database, * where we make sure to remember if a given key was already added in the * server.ready_keys list. */ typedef struct readyList { @@ -1066,7 +1066,7 @@ typedef struct readyList { robj *key; } readyList; -/* This structure represents a Redis user. This is useful for ACLs, the +/* This structure represents a user. This is useful for ACLs, the * user is associated to the connection after the connection is authenticated. * If there is no associated user, the connection uses the default user. */ #define USER_COMMAND_BITS_COUNT 1024 /* The total number of command bits @@ -1243,10 +1243,10 @@ typedef struct client { * changes. */ void *auth_callback_privdata; /* Private data that is passed when the auth * changed callback is executed. Opaque for - * Redis Core. */ + * the Server Core. */ void *auth_module; /* The module that owns the callback, which is used * to disconnect the client if the module is - * unloaded for cleanup. Opaque for Redis Core.*/ + * unloaded for cleanup. Opaque for the Server Core.*/ /* If this client is in tracking mode and this field is non zero, * invalidation messages for keys fetched by this client will be sent to @@ -1371,7 +1371,7 @@ typedef struct clientBufferLimitsConfig { extern clientBufferLimitsConfig clientBufferLimitsDefaults[CLIENT_TYPE_OBUF_COUNT]; -/* The serverOp structure defines a Redis Operation, that is an instance of +/* The serverOp structure defines an Operation, that is an instance of * a command with an argument vector, database ID, propagation target * (PROPAGATE_*), and command pointer. * @@ -1382,7 +1382,7 @@ typedef struct serverOp { int argc, dbid, target; } serverOp; -/* Defines an array of Redis operations. There is an API to add to this +/* Defines an array of Operations. There is an API to add to this * structure in an easy way. * * int serverOpArrayAppend(serverOpArray *oa, int dbid, robj **argv, int argc, int target); @@ -1526,7 +1526,7 @@ typedef struct { *----------------------------------------------------------------------------*/ /* AIX defines hz to __hz, we don't use this define and in order to allow - * Redis build on AIX we need to undef it. */ + * the server build on AIX we need to undef it. */ #ifdef _AIX #undef hz #endif @@ -2011,7 +2011,7 @@ struct valkeyServer { int cluster_announce_port; /* base port to announce on cluster bus. */ int cluster_announce_tls_port; /* TLS port to announce on cluster bus. */ int cluster_announce_bus_port; /* bus port to announce on cluster bus. */ - int cluster_module_flags; /* Set of flags that Redis modules are able + int cluster_module_flags; /* Set of flags that modules are able to set in order to suppress certain native Redis Cluster features. Check the VALKEYMODULE_CLUSTER_FLAG_*. */ @@ -2052,7 +2052,7 @@ struct valkeyServer { int tls_auth_clients; serverTLSContextConfig tls_ctx_config; /* cpu affinity */ - char *server_cpulist; /* cpu affinity list of redis server main/io thread. */ + char *server_cpulist; /* cpu affinity list of server main/io thread. */ char *bio_cpulist; /* cpu affinity list of bio thread. */ char *aof_rewrite_cpulist; /* cpu affinity list of aof rewrite process. */ char *bgsave_cpulist; /* cpu affinity list of bgsave process. */ @@ -2240,7 +2240,7 @@ typedef enum { typedef void serverCommandProc(client *c); typedef int serverGetKeysProc(struct serverCommand *cmd, robj **argv, int argc, getKeysResult *result); -/* Redis command structure. +/* Command structure. * * Note that the command table is in commands.c and it is auto-generated. * @@ -2355,7 +2355,7 @@ struct serverCommand { keySpec *key_specs; int key_specs_num; /* Use a function to determine keys arguments in a command line. - * Used for Redis Cluster redirect (may be NULL) */ + * Used for Cluster redirect (may be NULL) */ serverGetKeysProc *getkeys_proc; int num_args; /* Length of args array. */ /* Array of subcommands (may be NULL) */ @@ -2752,7 +2752,7 @@ void discardTransaction(client *c); void flagTransaction(client *c); void execCommandAbort(client *c, sds error); -/* Redis object implementation */ +/* Object implementation */ void decrRefCount(robj *o); void decrRefCountVoid(void *o); void incrRefCount(robj *o); @@ -3377,7 +3377,7 @@ void sentinelInfoCommand(client *c); void sentinelPublishCommand(client *c); void sentinelRoleCommand(client *c); -/* redis-check-rdb & aof */ +/* valkey-check-rdb & aof */ int redis_check_rdb(char *rdbfilename, FILE *fp); int redis_check_rdb_main(int argc, char **argv, FILE *fp); int redis_check_aof_main(int argc, char **argv); diff --git a/src/serverassert.h b/src/serverassert.h index da1b7c7fa..945549f89 100644 --- a/src/serverassert.h +++ b/src/serverassert.h @@ -1,8 +1,8 @@ /* serverassert.h -- Drop in replacements assert.h that prints the stack trace - * in the Redis logs. + * in the server logs. * * This file should be included instead of "assert.h" inside libraries used by - * Redis that are using assertions, so instead of Redis disappearing with + * the server that are using assertions, so instead of the server disappearing with * SIGABORT, we get the details and stack trace inside the log file. * * ---------------------------------------------------------------------------- diff --git a/src/slowlog.c b/src/slowlog.c index a68064af2..b6d743aa0 100644 --- a/src/slowlog.c +++ b/src/slowlog.c @@ -5,7 +5,7 @@ * using the 'slowlog-log-slower-than' config directive, that is also * readable and writable using the CONFIG SET/GET command. * - * The slow queries log is actually not "logged" in the Redis log file + * The slow queries log is actually not "logged" in the server log file * but is accessible thanks to the SLOWLOG command. * * ---------------------------------------------------------------------------- @@ -78,7 +78,7 @@ slowlogEntry *slowlogCreateEntry(client *c, robj **argv, int argc, long long dur /* Here we need to duplicate the string objects composing the * argument vector of the command, because those may otherwise * end shared with string objects stored into keys. Having - * shared objects between any part of Redis, and the data + * shared objects between any part of the server, and the data * structure holding the data, is a problem: FLUSHALL ASYNC * may release the shared string object and create a race. */ se->argv[j] = dupStringObject(argv[j]); @@ -138,7 +138,7 @@ void slowlogReset(void) { } /* The SLOWLOG command. Implements all the subcommands needed to handle the - * Redis slow log. */ + * slow log. */ void slowlogCommand(client *c) { if (c->argc == 2 && !strcasecmp(c->argv[1]->ptr,"help")) { const char *help[] = { diff --git a/src/socket.c b/src/socket.c index 775d56d37..70b77d4b4 100644 --- a/src/socket.c +++ b/src/socket.c @@ -31,7 +31,7 @@ #include "connhelpers.h" /* The connections module provides a lean abstraction of network connections - * to avoid direct socket and async event management across the Redis code base. + * to avoid direct socket and async event management across the server code base. * * It does NOT provide advanced connection features commonly found in similar * libraries such as complete in/out buffer management, throttling, etc. These diff --git a/src/sort.c b/src/sort.c index 78d15a719..dea9bb73e 100644 --- a/src/sort.c +++ b/src/sort.c @@ -185,7 +185,7 @@ int sortCompare(const void *s1, const void *s2) { return server.sort_desc ? -cmp : cmp; } -/* The SORT command is the most complex command in Redis. Warning: this code +/* The SORT command is the most complex command in the server. Warning: this code * is optimized for speed and a bit less for readability */ void sortCommandGeneric(client *c, int readonly) { list *operations; diff --git a/src/syncio.c b/src/syncio.c index b2843d5fb..b6aa6a8e7 100644 --- a/src/syncio.c +++ b/src/syncio.c @@ -32,7 +32,7 @@ /* ----------------- Blocking sockets I/O with timeouts --------------------- */ -/* Redis performs most of the I/O in a nonblocking way, with the exception +/* The server performs most of the I/O in a nonblocking way, with the exception * of the SYNC command where the slave does it in a blocking way, and * the MIGRATE command that must be blocking in order to be atomic from the * point of view of the two instances (one migrating the key and one receiving diff --git a/src/syscheck.c b/src/syscheck.c index 0ea3a2510..008e28bbf 100644 --- a/src/syscheck.c +++ b/src/syscheck.c @@ -63,7 +63,7 @@ static sds read_sysfs_line(char *path) { } /* Verify our clocksource implementation doesn't go through a system call (uses vdso). - * Going through a system call to check the time degrades Redis performance. */ + * Going through a system call to check the time degrades server performance. */ static int checkClocksource(sds *error_msg) { unsigned long test_time_us, system_hz; struct timespec ts; @@ -117,7 +117,7 @@ static int checkClocksource(sds *error_msg) { } /* Verify we're not using the `xen` clocksource. The xen hypervisor's default clocksource is slow and affects - * Redis's performance. This has been measured on ec2 xen based instances. ec2 recommends using the non-default + * the server's performance. This has been measured on ec2 xen based instances. ec2 recommends using the non-default * tsc clock source for these instances. */ int checkXenClocksource(sds *error_msg) { sds curr = read_sysfs_line("/sys/devices/system/clocksource/clocksource0/current_clocksource"); diff --git a/src/t_hash.c b/src/t_hash.c index ff8746384..5c1d218c5 100644 --- a/src/t_hash.c +++ b/src/t_hash.c @@ -137,7 +137,7 @@ int hashTypeGetValue(robj *o, sds field, unsigned char **vstr, unsigned int *vle return C_ERR; } -/* Like hashTypeGetValue() but returns a Redis object, which is useful for +/* Like hashTypeGetValue() but returns an Object, which is useful for * interaction with the hash type outside t_hash.c. * The function returns NULL if the field is not found in the hash. Otherwise * a newly allocated string object with the value is returned. */ diff --git a/src/t_list.c b/src/t_list.c index d93193749..a3668ce1e 100644 --- a/src/t_list.c +++ b/src/t_list.c @@ -1143,7 +1143,7 @@ void lmoveGenericCommand(client *c, int wherefrom, int whereto) { if (listTypeLength(sobj) == 0) { /* This may only happen after loading very old RDB files. Recent - * versions of Redis delete keys of empty lists. */ + * versions of the server delete keys of empty lists. */ addReplyNull(c); } else { robj *dobj = lookupKeyWrite(c->db,c->argv[2]); diff --git a/src/t_set.c b/src/t_set.c index 24e7b0e7d..cb53045eb 100644 --- a/src/t_set.c +++ b/src/t_set.c @@ -516,7 +516,7 @@ int setTypeConvertAndExpand(robj *setobj, int enc, unsigned long cap, int panic) return C_ERR; } - /* To add the elements we extract integers and create redis objects */ + /* To add the elements we extract integers and create Objects */ si = setTypeInitIterator(setobj); while ((element = setTypeNextObject(si)) != NULL) { serverAssert(dictAdd(d,element,NULL) == DICT_OK); diff --git a/src/t_stream.c b/src/t_stream.c index ee37f9780..f70019a74 100644 --- a/src/t_stream.c +++ b/src/t_stream.c @@ -1870,7 +1870,7 @@ robj *streamTypeLookupWriteOrCreate(client *c, robj *key, int no_create) { return o; } -/* Parse a stream ID in the format given by clients to Redis, that is +/* Parse a stream ID in the format given by clients to the server, that is * -, and converts it into a streamID structure. If * the specified ID is invalid C_ERR is returned and an error is reported * to the client, otherwise C_OK is returned. The ID may be in incomplete diff --git a/src/t_string.c b/src/t_string.c index 2bce3acc8..1a3687123 100644 --- a/src/t_string.c +++ b/src/t_string.c @@ -57,7 +57,7 @@ static int checkStringLength(client *c, long long size, long long append) { * * 'flags' changes the behavior of the command (NX, XX or GET, see below). * - * 'expire' represents an expire to set in form of a Redis object as passed + * 'expire' represents an expire to set in the form of an Object as passed * by the user. It is interpreted according to the specified 'unit'. * * 'ok_reply' and 'abort_reply' is what the function will reply to the client diff --git a/src/t_zset.c b/src/t_zset.c index 6d4edd212..d9a401a4d 100644 --- a/src/t_zset.c +++ b/src/t_zset.c @@ -36,9 +36,9 @@ * in order to get O(log(N)) INSERT and REMOVE operations into a sorted * data structure. * - * The elements are added to a hash table mapping Redis objects to scores. + * The elements are added to a hash table mapping Objects to scores. * At the same time the elements are added to a skip list mapping scores - * to Redis objects (so objects are sorted by scores in this "view"). + * to Objects (so objects are sorted by scores in this "view"). * * Note that the SDS string representing the element is the same in both * the hash table and skiplist in order to save memory. What we do in order @@ -598,7 +598,7 @@ static int zslParseRange(robj *min, robj *max, zrangespec *spec) { * - means the min string possible * + means the max string possible * - * If the string is valid the *dest pointer is set to the redis object + * If the string is valid the *dest pointer is set to the Object * that will be used for the comparison, and ex will be set to 0 or 1 * respectively if the item is exclusive or inclusive. C_OK will be * returned. diff --git a/src/tls.c b/src/tls.c index ee3cd0fa3..54eaf255d 100644 --- a/src/tls.c +++ b/src/tls.c @@ -27,7 +27,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#define VALKEYMODULE_CORE_MODULE /* A module that's part of the redis core, uses server.h too. */ +#define VALKEYMODULE_CORE_MODULE /* A module that's part of the server core, uses server.h too. */ #include "server.h" #include "connhelpers.h" @@ -1175,7 +1175,7 @@ int ValkeyModule_OnLoad(void *ctx, ValkeyModuleString **argv, int argc) { UNUSED(argv); UNUSED(argc); - /* Connection modules must be part of the same build as redis. */ + /* Connection modules must be part of the same build as the server. */ if (strcmp(REDIS_BUILD_ID_RAW, serverBuildIdRaw())) { serverLog(LL_NOTICE, "Connection type %s was not built together with the redis-server used.", CONN_TYPE_TLS); return VALKEYMODULE_ERR; diff --git a/src/tracking.c b/src/tracking.c index 429770065..87183af56 100644 --- a/src/tracking.c +++ b/src/tracking.c @@ -216,7 +216,7 @@ void enableTracking(client *c, uint64_t redirect_to, uint64_t options, robj **pr /* This function is called after the execution of a readonly command in the * case the client 'c' has keys tracking enabled and the tracking is not * in BCAST mode. It will populate the tracking invalidation table according - * to the keys the user fetched, so that Redis will know what are the clients + * to the keys the user fetched, so that the server will know what are the clients * that should receive an invalidation message with certain groups of keys * are modified. */ void trackingRememberKeys(client *tracking, client *executing) { @@ -268,7 +268,7 @@ void trackingRememberKeys(client *tracking, client *executing) { * * In case the 'proto' argument is non zero, the function will assume that * 'keyname' points to a buffer of 'keylen' bytes already expressed in the - * form of Redis RESP protocol. This is used for: + * form of RESP protocol. This is used for: * - In BCAST mode, to send an array of invalidated keys to all * applicable clients * - Following a flush command, to send a single RESP NULL to indicate @@ -331,7 +331,7 @@ void sendTrackingMessage(client *c, char *keyname, size_t keylen, int proto) { if (!(old_flags & CLIENT_PUSHING)) c->flags &= ~CLIENT_PUSHING; } -/* This function is called when a key is modified in Redis and in the case +/* This function is called when a key is modified in the server and in the case * we have at least one client with the BCAST mode enabled. * Its goal is to set the key in the right broadcast state if the key * matches one or more prefixes in the prefix table. Later when we @@ -355,7 +355,7 @@ void trackingRememberKeyToBroadcast(client *c, char *keyname, size_t keylen) { raxStop(&ri); } -/* This function is called from signalModifiedKey() or other places in Redis +/* This function is called from signalModifiedKey() or other places in the server * when a key changes value. In the context of keys tracking, our task here is * to send a notification to every client that may have keys about such caching * slot. @@ -366,7 +366,7 @@ void trackingRememberKeyToBroadcast(client *c, char *keyname, size_t keylen) { * * The last argument 'bcast' tells the function if it should also schedule * the key for broadcasting to clients in BCAST mode. This is the case when - * the function is called from the Redis core once a key is modified, however + * the function is called from the server core once a key is modified, however * we also call the function in order to evict keys in the key table in case * of memory pressure: in that case the key didn't really change, so we want * just to notify the clients that are in the table for this key, that would @@ -458,7 +458,7 @@ void trackingHandlePendingKeyInvalidations(void) { listEmpty(server.tracking_pending_keys); } -/* This function is called when one or all the Redis databases are +/* This function is called when one or all of the databases are * flushed. Caching keys are not specific for each DB but are global: * currently what we do is send a special notification to clients with * tracking enabled, sending a RESP NULL, which means, "all the keys", @@ -504,12 +504,12 @@ void trackingInvalidateKeysOnFlush(int async) { } } -/* Tracking forces Redis to remember information about which client may have +/* Tracking forces the server to remember information about which client may have * certain keys. In workloads where there are a lot of reads, but keys are * hardly modified, the amount of information we have to remember server side * could be a lot, with the number of keys being totally not bound. * - * So Redis allows the user to configure a maximum number of keys for the + * So the server allows the user to configure a maximum number of keys for the * invalidation table. This function makes sure that we don't go over the * specified fill rate: if we are over, we can just evict information about * a random key, and send invalidation messages to clients like if the key was @@ -553,7 +553,7 @@ void trackingLimitUsedSlots(void) { timeout_counter++; } -/* Generate Redis protocol for an array containing all the key names +/* Generate RESP for an array containing all the key names * in the 'keys' radix tree. If the client is not NULL, the list will not * include keys that were modified the last time by this client, in order * to implement the NOLOOP option. diff --git a/src/unix.c b/src/unix.c index eb5850765..5428c5110 100644 --- a/src/unix.c +++ b/src/unix.c @@ -56,7 +56,7 @@ static int connUnixListen(connListener *listener) { if (listener->bindaddr_count == 0) return C_OK; - /* currently listener->bindaddr_count is always 1, we still use a loop here in case Redis supports multi Unix socket in the future */ + /* currently listener->bindaddr_count is always 1, we still use a loop here in case the server supports multi Unix socket in the future */ for (int j = 0; j < listener->bindaddr_count; j++) { char *addr = listener->bindaddr[j]; diff --git a/src/util.c b/src/util.c index 3f9533369..b5ef5ea2b 100644 --- a/src/util.c +++ b/src/util.c @@ -696,7 +696,7 @@ int d2string(char *buf, size_t len, double value) { * We convert the double to long and multiply it by 10 ^ to shift * the decimal places. * Note that multiply it of input value by 10 ^ can overflow but on the scenario - * that we currently use within redis this that is not possible. + * that we currently use within the server this that is not possible. * After we get the long representation we use the logic from ull2string function on this file * which is based on the following article: * https://www.facebook.com/notes/facebook-engineering/three-optimization-tips-for-c/10151361643253920 @@ -959,8 +959,8 @@ void getRandomBytes(unsigned char *p, size_t len) { } } -/* Generate the Redis "Run ID", a SHA1-sized random number that identifies a - * given execution of Redis, so that if you are talking with an instance +/* Generate the server "Run ID", a SHA1-sized random number that identifies a + * given execution of the server, so that if you are talking with an instance * having run_id == A, and you reconnect and it has run_id == B, you can be * sure that it is either a different instance or it was restarted. */ void getRandomHexChars(char *p, size_t len) { @@ -1042,7 +1042,7 @@ long getTimeZone(void) { /* Return true if the specified path is just a file basename without any * relative or absolute path. This function just checks that no / or \ * character exists inside the specified path, that's enough in the - * environments where Redis runs. */ + * environments where the server runs. */ int pathIsBaseName(char *path) { return strchr(path,'/') == NULL && strchr(path,'\\') == NULL; } diff --git a/src/valkey-benchmark.c b/src/valkey-benchmark.c index bfc076092..d3a3944f7 100644 --- a/src/valkey-benchmark.c +++ b/src/valkey-benchmark.c @@ -1,4 +1,4 @@ -/* Redis benchmark utility. +/* Server benchmark utility. * * Copyright (c) 2009-2012, Salvatore Sanfilippo * All rights reserved. @@ -1377,7 +1377,7 @@ static void updateClusterSlotsConfiguration(void) { pthread_mutex_unlock(&config.is_updating_slots_mutex); } -/* Generate random data for redis benchmark. See #7196. */ +/* Generate random data for the benchmark. See #7196. */ static void genBenchmarkRandomData(char *data, int count) { static uint32_t state = 1234; int i = 0; diff --git a/src/valkey-check-aof.c b/src/valkey-check-aof.c index cf2888cb9..dfe268201 100644 --- a/src/valkey-check-aof.c +++ b/src/valkey-check-aof.c @@ -129,7 +129,7 @@ int readArgc(FILE *fp, long *target) { } /* Used to decode a RESP record in the AOF file to obtain the original - * redis command, and also check whether the command is MULTI/EXEC. If the + * server command, and also check whether the command is MULTI/EXEC. If the * command is MULTI, the parameter out_multi will be incremented by one, and * if the command is EXEC, the parameter out_multi will be decremented * by one. The parameter out_multi will be used by the upper caller to determine @@ -426,7 +426,7 @@ int fileIsManifest(char *filepath) { * AOF_RDB_PREAMBLE: Old-style RDB-preamble AOF * AOF_MULTI_PART: manifest in Multi Part AOF * - * redis-check-aof tool will automatically perform different + * valkey-check-aof tool will automatically perform different * verification logic according to different file formats. * */ input_file_type getInputFileType(char *filepath) { @@ -454,7 +454,7 @@ void printAofStyle(int ret, char *aofFileName, char *aofType) { /* Check if Multi Part AOF is valid. It will check the BASE file and INCR files * at once according to the manifest instructions (this is somewhat similar to - * redis' AOF loading). + * the server's AOF loading). * * When the verification is successful, we can guarantee: * 1. The manifest file format is valid diff --git a/src/valkey-check-rdb.c b/src/valkey-check-rdb.c index f938a4866..fcc525dcb 100644 --- a/src/valkey-check-rdb.c +++ b/src/valkey-check-rdb.c @@ -396,8 +396,8 @@ err: return 1; } -/* RDB check main: called form server.c when Redis is executed with the - * redis-check-rdb alias, on during RDB loading errors. +/* RDB check main: called form server.c when the server is executed with the + * valkey-check-rdb alias, on during RDB loading errors. * * The function works in two ways: can be called with argc/argv as a * standalone executable, or called with a non NULL 'fp' argument if we @@ -426,7 +426,7 @@ int redis_check_rdb_main(int argc, char **argv, FILE *fp) { /* In order to call the loading functions we need to create the shared * integer objects, however since this function may be called from - * an already initialized Redis instance, check if we really need to. */ + * an already initialized server instance, check if we really need to. */ if (shared.integers[0] == NULL) createSharedObjects(); server.loading_process_events_interval_bytes = 0; diff --git a/src/valkey-cli.c b/src/valkey-cli.c index ba16d03fa..cfc3fcaaf 100644 --- a/src/valkey-cli.c +++ b/src/valkey-cli.c @@ -1,4 +1,4 @@ -/* Redis CLI (command line interface) +/* Server CLI (command line interface) * * Copyright (c) 2009-2012, Salvatore Sanfilippo * All rights reserved. @@ -425,10 +425,10 @@ static int helpEntriesLen = 0; /* For backwards compatibility with pre-7.0 servers. * cliLegacyInitHelp() sets up the helpEntries array with the command and group - * names from the commands.c file. However the Redis instance we are connecting + * names from the commands.c file. However the server instance we are connecting * to may support more commands, so this function integrates the previous * entries with additional entries obtained using the COMMAND command - * available in recent versions of Redis. */ + * available in recent versions of the server. */ static void cliLegacyIntegrateHelp(void) { if (cliConnect(CC_QUIET) == REDIS_ERR) return; @@ -986,7 +986,7 @@ static void cliOutputHelp(int argc, char **argv) { if (helpEntries == NULL) { /* Initialize the help using the results of the COMMAND command. - * In case we are using redis-cli help XXX, we need to init it. */ + * In case we are using valkey-cli help XXX, we need to init it. */ cliInitHelp(); } @@ -1602,7 +1602,7 @@ static int cliSelect(void) { return result; } -/* Select RESP3 mode if redis-cli was started with the -3 option. */ +/* Select RESP3 mode if valkey-cli was started with the -3 option. */ static int cliSwitchProto(void) { redisReply *reply; if (!config.resp3 || config.resp2) return REDIS_OK; @@ -1689,7 +1689,7 @@ static int cliConnect(int flags) { } - /* Set aggressive KEEP_ALIVE socket option in the Redis context socket + /* Set aggressive KEEP_ALIVE socket option in the server context socket * in order to prevent timeouts caused by the execution of long * commands. At the same time this improves the detection of real * errors. */ @@ -2315,7 +2315,7 @@ static int cliReadReply(int output_raw_strings) { return REDIS_OK; } -/* Simultaneously wait for pubsub messages from redis and input on stdin. */ +/* Simultaneously wait for pubsub messages from the server and input on stdin. */ static void cliWaitForMessagesOrStdin(void) { int show_info = config.output != OUTPUT_RAW && (isatty(STDOUT_FILENO) || getenv("FAKETTY")); @@ -2337,7 +2337,7 @@ static void cliWaitForMessagesOrStdin(void) { } } while(reply); - /* Wait for input, either on the Redis socket or on stdin. */ + /* Wait for input, either on the server socket or on stdin. */ struct timeval tv; fd_set readfds; FD_ZERO(&readfds); @@ -2366,7 +2366,7 @@ static void cliWaitForMessagesOrStdin(void) { } break; } else if (FD_ISSET(context->fd, &readfds)) { - /* Message from Redis */ + /* Message from the server */ if (cliReadReply(0) != REDIS_OK) { cliPrintContextError(); exit(1); @@ -2409,7 +2409,7 @@ static int cliSendCommand(int argc, char **argv, long repeat) { !strcasecmp(argv[1],"graph")) || (argc == 2 && !strcasecmp(command,"latency") && !strcasecmp(argv[1],"doctor")) || - /* Format PROXY INFO command for Redis Cluster Proxy: + /* Format PROXY INFO command for Cluster Proxy: * https://github.com/artix75/redis-cluster-proxy */ (argc >= 2 && !strcasecmp(command,"proxy") && !strcasecmp(argv[1],"info"))) @@ -2760,7 +2760,7 @@ static int parseOptions(int argc, char **argv) { config.bigkeys = 1; } else if (!strcmp(argv[i],"--memkeys")) { config.memkeys = 1; - config.memkeys_samples = 0; /* use redis default */ + config.memkeys_samples = 0; /* use the server default */ } else if (!strcmp(argv[i],"--memkeys-samples") && !lastarg) { config.memkeys = 1; config.memkeys_samples = atoi(argv[++i]); @@ -3167,10 +3167,10 @@ static int confirmWithYes(char *msg, int ignore_force) { } static int issueCommandRepeat(int argc, char **argv, long repeat) { - /* In Lua debugging mode, we want to pass the "help" to Redis to get + /* In Lua debugging mode, we want to pass the "help" to the server to get * it's own HELP message, rather than handle it by the CLI, see ldbRepl. * - * For the normal Redis HELP, we can process it without a connection. */ + * For the normal server HELP, we can process it without a connection. */ if (!config.eval_ldb && (!strcasecmp(argv[0],"help") || !strcasecmp(argv[0],"?"))) { @@ -3363,9 +3363,9 @@ static void repl(void) { int argc; sds *argv; - /* There is no need to initialize redis HELP when we are in lua debugger mode. + /* There is no need to initialize HELP when we are in lua debugger mode. * It has its own HELP and commands (COMMAND or COMMAND DOCS will fail and got nothing). - * We will initialize the redis HELP after the Lua debugging session ended.*/ + * We will initialize the HELP after the Lua debugging session ended.*/ if ((!config.eval_ldb) && isatty(fileno(stdin))) { /* Initialize the help using the results of the COMMAND command. */ cliInitHelp(); @@ -4109,7 +4109,7 @@ static int clusterManagerNodeConnect(clusterManagerNode *node) { node->context = NULL; return 0; } - /* Set aggressive KEEP_ALIVE socket option in the Redis context socket + /* Set aggressive KEEP_ALIVE socket option in the server context socket * in order to prevent timeouts caused by the execution of long * commands. At the same time this improves the detection of real * errors. */ @@ -4193,7 +4193,7 @@ static void clusterManagerNodeResetSlots(clusterManagerNode *node) { node->slots_count = 0; } -/* Call "INFO" redis command on the specified node and return the reply. */ +/* Call "INFO" command on the specified node and return the reply. */ static redisReply *clusterManagerGetNodeRedisInfo(clusterManagerNode *node, char **err) { @@ -4882,7 +4882,7 @@ static int clusterManagerSetSlotOwner(clusterManagerNode *owner, } /* Get the hash for the values of the specified keys in *keys_reply for the - * specified nodes *n1 and *n2, by calling DEBUG DIGEST-VALUE redis command + * specified nodes *n1 and *n2, by calling DEBUG DIGEST-VALUE command * on both nodes. Every key with same name on both nodes but having different * values will be added to the *diffs list. Return 0 in case of reply * error. */ @@ -6873,7 +6873,7 @@ static void clusterManagerPrintNotClusterNodeError(clusterManagerNode *node, clusterManagerLogErr("[ERR] Node %s:%d %s\n", node->ip, node->port, msg); } -/* Execute redis-cli in Cluster Manager mode */ +/* Execute valkey-cli in Cluster Manager mode */ static void clusterManagerMode(clusterManagerCommandProc *proc) { int argc = config.cluster_manager_command.argc; char **argv = config.cluster_manager_command.argv; @@ -8828,7 +8828,7 @@ static void pipeMode(void) { /* The ECHO sequence starts with a "\r\n" so that if there * is garbage in the protocol we read from stdin, the ECHO * will likely still be properly formatted. - * CRLF is ignored by Redis, so it has no effects. */ + * CRLF is ignored by the server, so it has no effects. */ char echo[] = "\r\n*2\r\n$4\r\nECHO\r\n$20\r\n01234567890123456789\r\n"; int j; diff --git a/src/version.h b/src/version.h index b82be5cbe..3b2e3a060 100644 --- a/src/version.h +++ b/src/version.h @@ -2,7 +2,7 @@ #define VALKEY_VERSION "255.255.255" #define VALKEY_VERSION_NUM 0x00ffffff -/* Redis compatibility version, should never +/* Redis OSS compatibility version, should never * exceed 7.2.x. */ #define REDIS_VERSION "7.2.4" #define REDIS_VERSION_NUM 0x00070204 diff --git a/src/zipmap.c b/src/zipmap.c index 214c49d2f..de42a04ab 100644 --- a/src/zipmap.c +++ b/src/zipmap.c @@ -3,11 +3,11 @@ * implementing an O(n) lookup data structure designed to be very memory * efficient. * - * The Redis Hash type uses this data structure for hashes composed of a small + * The Hash type uses this data structure for hashes composed of a small * number of elements, to switch to a hash table once a given number of * elements is reached. * - * Given that many times Redis Hashes are used to represent objects composed + * Given that many times Hashes are used to represent objects composed * of few fields, this is a very big win in terms of used memory. * * -------------------------------------------------------------------------- diff --git a/src/zmalloc.c b/src/zmalloc.c index 65ad1f4c6..550752240 100644 --- a/src/zmalloc.c +++ b/src/zmalloc.c @@ -446,7 +446,7 @@ void zmadvise_dontneed(void *ptr) { /* Get the RSS information in an OS-specific way. * * WARNING: the function zmalloc_get_rss() is not designed to be fast - * and may not be called in the busy loops where Redis tries to release + * and may not be called in the busy loops where the server tries to release * memory expiring or swapping out objects. * * For this kind of "fast RSS reporting" usages use instead the @@ -769,7 +769,7 @@ void zlibc_trim(void) { /* For proc_pidinfo() used later in zmalloc_get_smap_bytes_by_field(). * Note that this file cannot be included in zmalloc.h because it includes * a Darwin queue.h file where there is a "LIST_HEAD" macro (!) defined - * conficting with Redis user code. */ + * conficting with user code. */ #include #endif diff --git a/src/zmalloc.h b/src/zmalloc.h index 9baa36b3d..1cf4af96c 100644 --- a/src/zmalloc.h +++ b/src/zmalloc.h @@ -99,8 +99,8 @@ #include #endif -/* We can enable the Redis defrag capabilities only if we are using Jemalloc - * and the version used is our special version modified for Redis having +/* We can enable the server defrag capabilities only if we are using Jemalloc + * and the version used is our special version modified for the server having * the ability to return per-allocation fragmentation hints. */ #if defined(USE_JEMALLOC) && defined(JEMALLOC_FRAG_HINT) #define HAVE_DEFRAG diff --git a/tests/assets/default.conf b/tests/assets/default.conf index de460cc08..4478f80fc 100644 --- a/tests/assets/default.conf +++ b/tests/assets/default.conf @@ -1,4 +1,4 @@ -# Redis configuration for testing. +# Server configuration for testing. always-show-logo yes notify-keyspace-events KEA diff --git a/tests/assets/test_cli_hint_suite.txt b/tests/assets/test_cli_hint_suite.txt index b4a20163f..3cebf5229 100644 --- a/tests/assets/test_cli_hint_suite.txt +++ b/tests/assets/test_cli_hint_suite.txt @@ -1,4 +1,4 @@ -# Test suite for redis-cli command-line hinting mechanism. +# Test suite for valkey-cli command-line hinting mechanism. # Each test case consists of two strings: a (partial) input command line, and the expected hint string. # Command with one arg: GET key diff --git a/tests/cluster/run.tcl b/tests/cluster/run.tcl index 86c5f589b..9808032b5 100644 --- a/tests/cluster/run.tcl +++ b/tests/cluster/run.tcl @@ -5,7 +5,7 @@ cd tests/cluster source cluster.tcl source ../instances.tcl -source ../../support/cluster.tcl ; # Redis Cluster client. +source ../../support/cluster.tcl ; # Cluster client. set ::instances_count 20 ; # How many instances we use at max. set ::tlsdir "../../tls" diff --git a/tests/cluster/tests/04-resharding.tcl b/tests/cluster/tests/04-resharding.tcl index babedd972..e38b2bc6b 100644 --- a/tests/cluster/tests/04-resharding.tcl +++ b/tests/cluster/tests/04-resharding.tcl @@ -101,7 +101,7 @@ test "Cluster consistency during live resharding" { set key "key:$listid" incr ele # We write both with Lua scripts and with plain commands. - # This way we are able to stress Lua -> Redis command invocation + # This way we are able to stress Lua -> server command invocation # as well, that has tests to prevent Lua to write into wrong # hash slots. # We also use both TLS and plaintext connections. @@ -129,7 +129,7 @@ test "Cluster consistency during live resharding" { } test "Verify $numkeys keys for consistency with logical content" { - # Check that the Redis Cluster content matches our logical content. + # Check that the Cluster content matches our logical content. foreach {key value} [array get content] { if {[$cluster lrange $key 0 -1] ne $value} { fail "Key $key expected to hold '$value' but actual content is [$cluster lrange $key 0 -1]" @@ -151,7 +151,7 @@ test "Cluster should eventually be up again" { } test "Verify $numkeys keys after the restart" { - # Check that the Redis Cluster content matches our logical content. + # Check that the Cluster content matches our logical content. foreach {key value} [array get content] { if {[$cluster lrange $key 0 -1] ne $value} { fail "Key $key expected to hold '$value' but actual content is [$cluster lrange $key 0 -1]" diff --git a/tests/cluster/tests/10-manual-failover.tcl b/tests/cluster/tests/10-manual-failover.tcl index 5441b79f3..e93bd680e 100644 --- a/tests/cluster/tests/10-manual-failover.tcl +++ b/tests/cluster/tests/10-manual-failover.tcl @@ -41,7 +41,7 @@ test "Send CLUSTER FAILOVER to #5, during load" { set key "key:$listid" set ele [randomValue] # We write both with Lua scripts and with plain commands. - # This way we are able to stress Lua -> Redis command invocation + # This way we are able to stress Lua -> server command invocation # as well, that has tests to prevent Lua to write into wrong # hash slots. if {$listid % 2} { @@ -80,7 +80,7 @@ test "Instance #5 is now a master" { } test "Verify $numkeys keys for consistency with logical content" { - # Check that the Redis Cluster content matches our logical content. + # Check that the Cluster content matches our logical content. foreach {key value} [array get content] { assert {[$cluster lrange $key 0 -1] eq $value} } diff --git a/tests/cluster/tests/20-half-migrated-slot.tcl b/tests/cluster/tests/20-half-migrated-slot.tcl index 229b3a86d..6d49716e1 100644 --- a/tests/cluster/tests/20-half-migrated-slot.tcl +++ b/tests/cluster/tests/20-half-migrated-slot.tcl @@ -6,7 +6,7 @@ # 5. migration is half finished on "importing" node # TODO: Test is currently disabled until it is stabilized (fixing the test -# itself or real issues in Redis). +# itself or real issues in the server). if {false} { source "../tests/includes/init-tests.tcl" diff --git a/tests/cluster/tests/21-many-slot-migration.tcl b/tests/cluster/tests/21-many-slot-migration.tcl index 1ac73dc99..e4f8eb205 100644 --- a/tests/cluster/tests/21-many-slot-migration.tcl +++ b/tests/cluster/tests/21-many-slot-migration.tcl @@ -1,7 +1,7 @@ # Tests for many simultaneous migrations. # TODO: Test is currently disabled until it is stabilized (fixing the test -# itself or real issues in Redis). +# itself or real issues in the server). if {false} { diff --git a/tests/cluster/tests/includes/utils.tcl b/tests/cluster/tests/includes/utils.tcl index e8925ebfc..dd477cce8 100644 --- a/tests/cluster/tests/includes/utils.tcl +++ b/tests/cluster/tests/includes/utils.tcl @@ -13,7 +13,7 @@ proc fix_cluster {addr} { if {$code != 0} { puts "redis-cli --cluster fix returns non-zero exit code, output below:\n$result" } - # Note: redis-cli --cluster fix may return a non-zero exit code if nodes don't agree, + # Note: valkey-cli --cluster fix may return a non-zero exit code if nodes don't agree, # but we can ignore that and rely on the check below. assert_cluster_state ok wait_for_condition 100 100 { diff --git a/tests/helpers/fake_redis_node.tcl b/tests/helpers/fake_redis_node.tcl index a12d87fed..cfcce6240 100644 --- a/tests/helpers/fake_redis_node.tcl +++ b/tests/helpers/fake_redis_node.tcl @@ -1,4 +1,4 @@ -# A fake Redis node for replaying predefined/expected traffic with a client. +# A fake node for replaying predefined/expected traffic with a client. # # Usage: tclsh fake_redis_node.tcl PORT COMMAND REPLY [ COMMAND REPLY [ ... ] ] # diff --git a/tests/instances.tcl b/tests/instances.tcl index 1450d7ee0..7f81a15bc 100644 --- a/tests/instances.tcl +++ b/tests/instances.tcl @@ -1,6 +1,6 @@ # Multi-instance test framework. -# This is used in order to test Sentinel and Redis Cluster, and provides -# basic capabilities for spawning and handling N parallel Redis / Sentinel +# This is used in order to test Sentinel and Cluster, and provides +# basic capabilities for spawning and handling N parallel Server / Sentinel # instances. # # Copyright (C) 2014 Salvatore Sanfilippo antirez@gmail.com @@ -64,7 +64,7 @@ proc exec_instance {type dirname cfgfile} { return $pid } -# Spawn a redis or sentinel instance, depending on 'type'. +# Spawn a server or sentinel instance, depending on 'type'. proc spawn_instance {type base_port count {conf {}} {base_conf_file ""}} { for {set j 0} {$j < $count} {incr j} { set port [find_available_port $base_port $::redis_port_count] @@ -526,14 +526,14 @@ proc S {n args} { [dict get $s link] {*}$args } -# Returns a Redis instance by index. +# Returns a server instance by index. # Example: # [Rn 0] info proc Rn {n} { return [dict get [lindex $::redis_instances $n] link] } -# Like R but to chat with Redis instances. +# Like R but to chat with server instances. proc R {n args} { [Rn $n] {*}$args } @@ -566,7 +566,7 @@ proc RPort {n} { } } -# Iterate over IDs of sentinel or redis instances. +# Iterate over IDs of sentinel or server instances. proc foreach_instance_id {instances idvar code} { upvar 1 $idvar id for {set id 0} {$id < [llength $instances]} {incr id} { diff --git a/tests/integration/aof-multi-part.tcl b/tests/integration/aof-multi-part.tcl index 383dbeb73..c64223204 100644 --- a/tests/integration/aof-multi-part.tcl +++ b/tests/integration/aof-multi-part.tcl @@ -19,9 +19,9 @@ tags {"external:skip"} { # Test Part 1 - # In order to test the loading logic of redis under different combinations of manifest and AOF. - # We will manually construct the manifest file and AOF, and then start redis to verify whether - # the redis behavior is as expected. + # In order to test the loading logic of the server under different combinations of manifest and AOF. + # We will manually construct the manifest file and AOF, and then start the server to verify whether + # the server behavior is as expected. test {Multi Part AOF can't load data when some file missing} { create_aof $aof_dirpath $aof_base1_file { @@ -748,8 +748,8 @@ tags {"external:skip"} { # Test Part 2 # - # To test whether the AOFRW behaves as expected during the redis run. - # We will start redis first, then perform pressure writing, enable and disable AOF, and manually + # To test whether the AOFRW behaves as expected during the server run. + # We will start the server first, then perform pressure writing, enable and disable AOF, and manually # and automatically run bgrewrite and other actions, to test whether the correct AOF file is created, # whether the correct manifest is generated, whether the data can be reload correctly under continuous # writing pressure, etc. diff --git a/tests/integration/aof.tcl b/tests/integration/aof.tcl index 6006a00ff..5c24e7160 100644 --- a/tests/integration/aof.tcl +++ b/tests/integration/aof.tcl @@ -374,7 +374,7 @@ tags {"aof external:skip"} { } } - # redis could load AOF which has timestamp annotations inside + # The server could load AOF which has timestamp annotations inside create_aof $aof_dirpath $aof_file { append_to_aof "#TS:1628217470\r\n" append_to_aof [formatCommand set foo1 bar1] diff --git a/tests/integration/corrupt-dump-fuzzer.tcl b/tests/integration/corrupt-dump-fuzzer.tcl index 206e503fc..0ed30ee5e 100644 --- a/tests/integration/corrupt-dump-fuzzer.tcl +++ b/tests/integration/corrupt-dump-fuzzer.tcl @@ -5,7 +5,7 @@ tags {"dump" "corruption" "external:skip" "logreqres:skip"} { # catch sigterm so that in case one of the random command hangs the test, -# usually due to redis not putting a response in the output buffers, +# usually due to the server not putting a response in the output buffers, # we'll know which command it was if { ! [ catch { package require Tclx diff --git a/tests/integration/logging.tcl b/tests/integration/logging.tcl index b547cd8fa..06b2e24e5 100644 --- a/tests/integration/logging.tcl +++ b/tests/integration/logging.tcl @@ -8,7 +8,7 @@ if {$system_name eq {linux}} { } # look for the DEBUG command in the backtrace, used when we triggered -# a stack trace print while we know redis is running that command. +# a stack trace print while we know the server is running that command. proc check_log_backtrace_for_debug {log_pattern} { # search for the final line in the stacktraces generation to make sure it was completed. set pattern "* STACK TRACE DONE *" @@ -17,7 +17,7 @@ proc check_log_backtrace_for_debug {log_pattern} { set res [wait_for_log_messages 0 \"$log_pattern\" 0 100 100] if {$::verbose} { puts $res} - # If the stacktrace is printed more than once, it means redis crashed during crash report generation + # If the stacktrace is printed more than once, it means the server crashed during crash report generation assert_equal [count_log_message 0 "STACK TRACE -"] 1 upvar threads_mngr_supported threads_mngr_supported @@ -30,7 +30,7 @@ proc check_log_backtrace_for_debug {log_pattern} { # the following are skipped since valgrind is slow and a timeout can happen if {!$::valgrind} { assert_equal [count_log_message 0 "wait_threads(): waiting threads timed out"] 0 - # make sure redis prints stack trace for all threads. we know 3 threads are idle in bio.c + # make sure the server prints stack trace for all threads. we know 3 threads are idle in bio.c assert_equal [count_log_message 0 "bioProcessBackgroundJobs"] 3 } } @@ -55,7 +55,7 @@ if {$backtrace_supported} { r debug sleep 1 check_log_backtrace_for_debug "*WATCHDOG TIMER EXPIRED*" - # make sure redis is still alive + # make sure the server is still alive assert_equal "PONG" [r ping] } } @@ -77,7 +77,7 @@ if {!$::valgrind} { r deferred 1 r debug sleep 10 ;# so that we see the function in the stack trace r flush - after 100 ;# wait for redis to get into the sleep + after 100 ;# wait for the server to get into the sleep exec kill -SIGABRT $pid $check_cb "*crashed by signal*" } @@ -100,12 +100,12 @@ if {!$::valgrind} { r deferred 1 r debug sleep 10 ;# so that we see the function in the stack trace r flush - after 100 ;# wait for redis to get into the sleep + after 100 ;# wait for the server to get into the sleep exec kill -SIGALRM $pid $check_cb "*Received SIGALRM*" r read r deferred 0 - # make sure redis is still alive + # make sure the server is still alive assert_equal "PONG" [r ping] } } diff --git a/tests/integration/psync2-pingoff.tcl b/tests/integration/psync2-pingoff.tcl index 3589d07e7..4ea70f0c3 100644 --- a/tests/integration/psync2-pingoff.tcl +++ b/tests/integration/psync2-pingoff.tcl @@ -1,5 +1,5 @@ # These tests were added together with the meaningful offset implementation -# in redis 6.0.0, which was later abandoned in 6.0.4, they used to test that +# in redis OSS 6.0.0, which was later abandoned in 6.0.4, they used to test that # servers are able to PSYNC with replicas even if the replication stream has # PINGs at the end which present in one sever and missing on another. # We keep these tests just because they reproduce edge cases in the replication diff --git a/tests/integration/psync2-reg.tcl b/tests/integration/psync2-reg.tcl index a803d82a8..53a45cf57 100644 --- a/tests/integration/psync2-reg.tcl +++ b/tests/integration/psync2-reg.tcl @@ -1,7 +1,7 @@ # Issue 3899 regression test. # We create a chain of three instances: master -> slave -> slave2 # and continuously break the link while traffic is generated by -# redis-benchmark. At the end we check that the data is the same +# valkey-benchmark. At the end we check that the data is the same # everywhere. start_server {tags {"psync2 external:skip"}} { diff --git a/tests/integration/psync2.tcl b/tests/integration/psync2.tcl index 4abe059b1..69d536601 100644 --- a/tests/integration/psync2.tcl +++ b/tests/integration/psync2.tcl @@ -77,7 +77,7 @@ start_server {} { start_server {} { set master_id 0 ; # Current master set start_time [clock seconds] ; # Test start time - set counter_value 0 ; # Current value of the Redis counter "x" + set counter_value 0 ; # Current value of the server counter "x" # Config set debug_msg 0 ; # Enable additional debug messages diff --git a/tests/integration/rdb.tcl b/tests/integration/rdb.tcl index 106fc0b50..f70900c1a 100644 --- a/tests/integration/rdb.tcl +++ b/tests/integration/rdb.tcl @@ -255,7 +255,7 @@ start_server {overrides {save ""}} { assert {[s rdb_last_cow_size] == 0} # using a 200us delay, the bgsave is empirically taking about 10 seconds. - # we need it to take more than some 5 seconds, since redis only report COW once a second. + # we need it to take more than some 5 seconds, since the server only report COW once a second. r config set rdb-key-save-delay 200 r config set loglevel debug diff --git a/tests/integration/valkey-benchmark.tcl b/tests/integration/valkey-benchmark.tcl index c3254408c..e62985312 100644 --- a/tests/integration/valkey-benchmark.tcl +++ b/tests/integration/valkey-benchmark.tcl @@ -5,7 +5,7 @@ proc cmdstat {cmd} { return [cmdrstat $cmd r] } -# common code to reset stats, flush the db and run redis-benchmark +# common code to reset stats, flush the db and run valkey-benchmark proc common_bench_setup {cmd} { r config resetstat r flushall diff --git a/tests/integration/valkey-cli.tcl b/tests/integration/valkey-cli.tcl index 19b6e00ba..4a6a2b314 100644 --- a/tests/integration/valkey-cli.tcl +++ b/tests/integration/valkey-cli.tcl @@ -360,7 +360,7 @@ start_server {tags {"cli"}} { if {!$::tls} { ;# fake_redis_node doesn't support TLS test_nontty_cli "ASK redirect test" { - # Set up two fake Redis nodes. + # Set up two fake nodes. set tclsh [info nameofexecutable] set script "tests/helpers/fake_redis_node.tcl" set port1 [find_available_port $::baseport $::portcount] diff --git a/tests/modules/aclcheck.c b/tests/modules/aclcheck.c index b74651804..28ea1a563 100644 --- a/tests/modules/aclcheck.c +++ b/tests/modules/aclcheck.c @@ -226,7 +226,7 @@ int RedisModule_OnLoad(RedisModuleCtx *ctx, RedisModuleString **argv, int argc) if (argc > 1) return RedisModule_WrongArity(ctx); /* When that flag is passed, we try to create too many categories, - * and the test expects this to fail. In this case redis returns REDISMODULE_ERR + * and the test expects this to fail. In this case the server returns REDISMODULE_ERR * and set errno to ENOMEM*/ if (argc == 1) { long long fail_flag = 0; @@ -289,14 +289,14 @@ int RedisModule_OnLoad(RedisModuleCtx *ctx, RedisModuleString **argv, int argc) return REDISMODULE_ERR; /* This validates that, when module tries to add a category with invalid characters, - * redis returns REDISMODULE_ERR and set errno to `EINVAL` */ + * the server returns REDISMODULE_ERR and set errno to `EINVAL` */ if (RedisModule_AddACLCategory(ctx,"!nval!dch@r@cter$") == REDISMODULE_ERR) RedisModule_Assert(errno == EINVAL); else return REDISMODULE_ERR; /* This validates that, when module tries to add a category that already exists, - * redis returns REDISMODULE_ERR and set errno to `EBUSY` */ + * the server returns REDISMODULE_ERR and set errno to `EBUSY` */ if (RedisModule_AddACLCategory(ctx,"write") == REDISMODULE_ERR) RedisModule_Assert(errno == EBUSY); else diff --git a/tests/modules/auth.c b/tests/modules/auth.c index 19be95a0a..5d6b74092 100644 --- a/tests/modules/auth.c +++ b/tests/modules/auth.c @@ -220,8 +220,8 @@ int test_rm_register_blocking_auth_cb(RedisModuleCtx *ctx, RedisModuleString **a return REDISMODULE_OK; } -/* This function must be present on each Redis module. It is used in order to - * register the commands into the Redis server. */ +/* This function must be present on each module. It is used in order to + * register the commands into the server. */ int RedisModule_OnLoad(RedisModuleCtx *ctx, RedisModuleString **argv, int argc) { REDISMODULE_NOT_USED(argv); REDISMODULE_NOT_USED(argc); diff --git a/tests/modules/basics.c b/tests/modules/basics.c index 897cb5d87..33086c302 100644 --- a/tests/modules/basics.c +++ b/tests/modules/basics.c @@ -1,4 +1,4 @@ -/* Module designed to test the Redis modules subsystem. +/* Module designed to test the modules subsystem. * * ----------------------------------------------------------------------------- * diff --git a/tests/modules/blockedclient.c b/tests/modules/blockedclient.c index 4a59623fd..c3a354670 100644 --- a/tests/modules/blockedclient.c +++ b/tests/modules/blockedclient.c @@ -16,7 +16,7 @@ static volatile int g_slow_bg_operation = 0; static volatile int g_is_in_slow_bg_operation = 0; void *sub_worker(void *arg) { - // Get Redis module context + // Get module context RedisModuleCtx *ctx = (RedisModuleCtx *)arg; // Try acquiring GIL @@ -32,7 +32,7 @@ void *worker(void *arg) { // Retrieve blocked client RedisModuleBlockedClient *bc = (RedisModuleBlockedClient *)arg; - // Get Redis module context + // Get module context RedisModuleCtx *ctx = RedisModule_GetThreadSafeContext(bc); // Acquire GIL @@ -55,7 +55,7 @@ void *worker(void *arg) { // Unblock client RedisModule_UnblockClient(bc, NULL); - // Free the Redis module context + // Free the module context RedisModule_FreeThreadSafeContext(ctx); return NULL; @@ -104,7 +104,7 @@ void *bg_call_worker(void *arg) { bg_call_data *bg = arg; RedisModuleBlockedClient *bc = bg->bc; - // Get Redis module context + // Get module context RedisModuleCtx *ctx = RedisModule_GetThreadSafeContext(bg->bc); // Acquire GIL @@ -156,7 +156,7 @@ void *bg_call_worker(void *arg) { // Unblock client RedisModule_UnblockClient(bc, NULL); - // Free the Redis module context + // Free the module context RedisModule_FreeThreadSafeContext(ctx); return NULL; @@ -616,7 +616,7 @@ static void timer_callback(RedisModuleCtx *ctx, void *data) RedisModuleBlockedClient *bc = data; - // Get Redis module context + // Get module context RedisModuleCtx *reply_ctx = RedisModule_GetThreadSafeContext(bc); // Reply to client @@ -625,7 +625,7 @@ static void timer_callback(RedisModuleCtx *ctx, void *data) // Unblock client RedisModule_UnblockClient(bc, NULL); - // Free the Redis module context + // Free the module context RedisModule_FreeThreadSafeContext(reply_ctx); } diff --git a/tests/modules/blockonkeys.c b/tests/modules/blockonkeys.c index 94bb36123..c7b4797fd 100644 --- a/tests/modules/blockonkeys.c +++ b/tests/modules/blockonkeys.c @@ -10,7 +10,7 @@ #define LIST_SIZE 1024 /* The FSL (Fixed-Size List) data type is a low-budget imitation of the - * native Redis list, in order to test list-like commands implemented + * list data type, in order to test list-like commands implemented * by a module. * Examples: FSL.PUSH, FSL.BPOP, etc. */ diff --git a/tests/modules/cmdintrospection.c b/tests/modules/cmdintrospection.c index 1a5e4863b..3a1870a3f 100644 --- a/tests/modules/cmdintrospection.c +++ b/tests/modules/cmdintrospection.c @@ -29,7 +29,7 @@ int RedisModule_OnLoad(RedisModuleCtx *ctx, RedisModuleString **argv, int argc) .tips = "nondeterministic_output", .history = (RedisModuleCommandHistoryEntry[]){ /* NOTE: All versions specified should be the module's versions, not - * Redis'! We use Redis versions in this example for the purpose of + * the server's! We use server versions in this example for the purpose of * testing (comparing the output with the output of the vanilla * XADD). */ {"6.2.0", "Added the `NOMKSTREAM` option, `MINID` trimming strategy and the `LIMIT` option."}, diff --git a/tests/modules/datatype2.c b/tests/modules/datatype2.c index bc0dc3dfe..fbfafd6f6 100644 --- a/tests/modules/datatype2.c +++ b/tests/modules/datatype2.c @@ -45,7 +45,7 @@ * dict * * - * Keys in redis database: + * Keys in server database: * * ┌───────┐ * │ size │ @@ -64,7 +64,7 @@ * │ k3 │ ───┼─┐ │ k2 │ ───┼─┐ * │ │ │ │ │ │ │ │ * └─────┴─────┘ │ ┌───────┐ └─────┴─────┘ │ ┌───────┐ - * redis db[0] │ │ size │ redis db[1] │ │ size │ + * server db[0] │ │ size │ server db[1] │ │ size │ * └───────────►│ used │ └───────────►│ used │ * │ mask │ │ mask │ * └───────┘ └───────┘ diff --git a/tests/modules/hooks.c b/tests/modules/hooks.c index e91dd9bb5..24449d0d3 100644 --- a/tests/modules/hooks.c +++ b/tests/modules/hooks.c @@ -400,8 +400,8 @@ static int cmdKeyExpiry(RedisModuleCtx *ctx, RedisModuleString **argv, int argc) return REDISMODULE_OK; } -/* This function must be present on each Redis module. It is used in order to - * register the commands into the Redis server. */ +/* This function must be present on each module. It is used in order to + * register the commands into the server. */ int RedisModule_OnLoad(RedisModuleCtx *ctx, RedisModuleString **argv, int argc) { #define VerifySubEventSupported(e, s) \ if (!RedisModule_IsSubEventSupported(e, s)) { \ diff --git a/tests/modules/keyspace_events.c b/tests/modules/keyspace_events.c index 1a284b50f..d60d8a693 100644 --- a/tests/modules/keyspace_events.c +++ b/tests/modules/keyspace_events.c @@ -316,8 +316,8 @@ static int cmdGetDels(RedisModuleCtx *ctx, RedisModuleString **argv, int argc) { return RedisModule_ReplyWithLongLong(ctx, dels); } -/* This function must be present on each Redis module. It is used in order to - * register the commands into the Redis server. */ +/* This function must be present on each module. It is used in order to + * register the commands into the server. */ int RedisModule_OnLoad(RedisModuleCtx *ctx, RedisModuleString **argv, int argc) { if (RedisModule_Init(ctx,"testkeyspace",1,REDISMODULE_APIVER_1) == REDISMODULE_ERR){ return REDISMODULE_ERR; diff --git a/tests/modules/postnotifications.c b/tests/modules/postnotifications.c index 770711bc3..52baec2a5 100644 --- a/tests/modules/postnotifications.c +++ b/tests/modules/postnotifications.c @@ -244,8 +244,8 @@ static void KeySpace_ServerEventCallback(RedisModuleCtx *ctx, RedisModuleEvent e if (res == REDISMODULE_ERR) KeySpace_ServerEventPostNotificationFree(pn_ctx); } -/* This function must be present on each Redis module. It is used in order to - * register the commands into the Redis server. */ +/* This function must be present on each module. It is used in order to + * register the commands into the server. */ int RedisModule_OnLoad(RedisModuleCtx *ctx, RedisModuleString **argv, int argc) { REDISMODULE_NOT_USED(argv); REDISMODULE_NOT_USED(argc); diff --git a/tests/modules/test_lazyfree.c b/tests/modules/test_lazyfree.c index 7ba213ff8..d47cc7dbd 100644 --- a/tests/modules/test_lazyfree.c +++ b/tests/modules/test_lazyfree.c @@ -166,7 +166,7 @@ int RedisModule_OnLoad(RedisModuleCtx *ctx, RedisModuleString **argv, int argc) if (RedisModule_Init(ctx,"lazyfreetest",1,REDISMODULE_APIVER_1) == REDISMODULE_ERR) return REDISMODULE_ERR; - /* We only allow our module to be loaded when the redis core version is greater than the version of my module */ + /* We only allow our module to be loaded when the core version is greater than the version of my module */ if (RedisModule_GetTypeMethodVersion() < REDISMODULE_TYPE_METHOD_VERSION) { return REDISMODULE_ERR; } diff --git a/tests/modules/usercall.c b/tests/modules/usercall.c index 316de1eea..4add315d5 100644 --- a/tests/modules/usercall.c +++ b/tests/modules/usercall.c @@ -117,7 +117,7 @@ void *bg_call_worker(void *arg) { bg_call_data *bg = arg; RedisModuleBlockedClient *bc = bg->bc; - // Get Redis module context + // Get module context RedisModuleCtx *ctx = RedisModule_GetThreadSafeContext(bg->bc); // Acquire GIL @@ -157,7 +157,7 @@ void *bg_call_worker(void *arg) { // Unblock client RedisModule_UnblockClient(bc, NULL); - // Free the Redis module context + // Free the module context RedisModule_FreeThreadSafeContext(ctx); return NULL; diff --git a/tests/sentinel/tests/10-replica-priority.tcl b/tests/sentinel/tests/10-replica-priority.tcl index d3f868afa..17a59ed66 100644 --- a/tests/sentinel/tests/10-replica-priority.tcl +++ b/tests/sentinel/tests/10-replica-priority.tcl @@ -24,7 +24,7 @@ test "Check acceptable replica-priority values" { fail "Able to set replica-announced with something else than yes or no (a3b2c1) whereas it should not be possible" } - # test only the first redis replica, no need to double test + # test only the first replica, no need to double test break } } diff --git a/tests/support/cluster.tcl b/tests/support/cluster.tcl index 081ef6a95..f6ae76f2f 100644 --- a/tests/support/cluster.tcl +++ b/tests/support/cluster.tcl @@ -1,4 +1,4 @@ -# Tcl redis cluster client as a wrapper of redis.rb. +# Tcl cluster client as a wrapper of redis.rb. # Copyright (C) 2014 Salvatore Sanfilippo # Released under the BSD license like Redis itself # @@ -57,7 +57,7 @@ proc redis_cluster {nodes {tls -1}} { # maps ::redis_cluster::slots($id) with an hash mapping slot numbers # to node IDs. # -# This function is called when a new Redis Cluster client is initialized +# This function is called when a new Cluster client is initialized # and every time we get a -MOVED redirection error. proc ::redis_cluster::__method__refresh_nodes_map {id} { # Contact the first responding startup node. @@ -258,7 +258,7 @@ proc ::redis_cluster::__dispatch__ {id method args} { proc ::redis_cluster::get_keys_from_command {cmd argv} { set cmd [string tolower $cmd] - # Most Redis commands get just one key as first argument. + # Most commands get just one key as first argument. if {[lsearch -exact $::redis_cluster::plain_commands $cmd] != -1} { return [list [lindex $argv 0]] } @@ -276,7 +276,7 @@ proc ::redis_cluster::get_keys_from_command {cmd argv} { } # Returns the CRC16 of the specified string. -# The CRC parameters are described in the Redis Cluster specification. +# The CRC parameters are described in the Cluster specification. set ::redis_cluster::XMODEMCRC16Lookup { 0x0000 0x1021 0x2042 0x3063 0x4084 0x50a5 0x60c6 0x70e7 0x8108 0x9129 0xa14a 0xb16b 0xc18c 0xd1ad 0xe1ce 0xf1ef @@ -323,7 +323,7 @@ proc ::redis_cluster::crc16 {s} { } # Hash a single key returning the slot it belongs to, Implemented hash -# tags as described in the Redis Cluster specification. +# tags as described in the Cluster specification. proc ::redis_cluster::hash {key} { set keylen [string length $key] set s {} @@ -352,7 +352,7 @@ proc ::redis_cluster::hash {key} { # Return the slot the specified keys hash to. # If the keys hash to multiple slots, an empty string is returned to -# signal that the command can't be run in Redis Cluster. +# signal that the command can't be run in Cluster. proc ::redis_cluster::get_slot_from_keys {keys} { set slot {} foreach k $keys { diff --git a/tests/support/redis.tcl b/tests/support/redis.tcl index 53fa9fe91..bc106ffd6 100644 --- a/tests/support/redis.tcl +++ b/tests/support/redis.tcl @@ -1,4 +1,4 @@ -# Tcl client library - used by the Redis test +# Tcl client library - used by the server test # Copyright (C) 2009-2014 Salvatore Sanfilippo # Released under the BSD license like Redis itself # diff --git a/tests/support/response_transformers.tcl b/tests/support/response_transformers.tcl index c49bbb15c..eeba2ff3b 100644 --- a/tests/support/response_transformers.tcl +++ b/tests/support/response_transformers.tcl @@ -1,4 +1,4 @@ -# Tcl client library - used by the Redis test +# Tcl client library - used by the server test # Copyright (C) 2009-2023 Redis Ltd. # Released under the BSD license like Redis itself # diff --git a/tests/support/util.tcl b/tests/support/util.tcl index 00d94ff33..6567abc65 100644 --- a/tests/support/util.tcl +++ b/tests/support/util.tcl @@ -542,7 +542,7 @@ proc find_valgrind_errors {stderr on_termination} { return "" } - # Look for the absence of a leak free summary (happens when redis isn't terminated properly). + # Look for the absence of a leak free summary (happens when the server isn't terminated properly). if {(![regexp -- {definitely lost: 0 bytes} $buf] && ![regexp -- {no leaks are possible} $buf])} { return $buf @@ -552,7 +552,7 @@ proc find_valgrind_errors {stderr on_termination} { } # Execute a background process writing random data for the specified number -# of seconds to the specified Redis instance. +# of seconds to the specified the server instance. proc start_write_load {host port seconds} { set tclsh [info nameofexecutable] exec $tclsh tests/helpers/gen_write_load.tcl $host $port $seconds $::tls & @@ -588,7 +588,7 @@ proc lshuffle {list} { } # Execute a background process writing complex data for the specified number -# of ops to the specified Redis instance. +# of ops to the specified server instance. proc start_bg_complex_data {host port db ops} { set tclsh [info nameofexecutable] exec $tclsh tests/helpers/bg_complex_data.tcl $host $port $db $ops $::tls & @@ -601,7 +601,7 @@ proc stop_bg_complex_data {handle} { # Write num keys with the given key prefix and value size (in bytes). If idx is # given, it's the index (AKA level) used with the srv procedure and it specifies -# to which Redis instance to write the keys. +# to which server instance to write the keys. proc populate {num {prefix key:} {size 3} {idx 0} {prints false} {expires 0}} { r $idx deferred 1 if {$num > 16} {set pipeline 16} else {set pipeline $num} @@ -705,11 +705,11 @@ proc generate_fuzzy_traffic_on_key {key duration} { # find a random command for our key type set cmd_idx [expr {int(rand()*[llength $cmds])}] set cmd [lindex $cmds $cmd_idx] - # get the command details from redis + # get the command details from the server if { [ catch { set cmd_info [lindex [r command info $cmd] 0] } err ] } { - # if we failed, it means redis crashed after the previous command + # if we failed, it means the server crashed after the previous command return $sent } # try to build a valid command argument @@ -1022,7 +1022,7 @@ proc init_large_mem_vars {} { } } -# Utility function to write big argument into redis client connection +# Utility function to write big argument into a server client connection proc write_big_bulk {size {prefix ""} {skip_read no}} { init_large_mem_vars diff --git a/tests/test_helper.tcl b/tests/test_helper.tcl index 1c79cbbec..a6a2b658b 100644 --- a/tests/test_helper.tcl +++ b/tests/test_helper.tcl @@ -1,4 +1,4 @@ -# Redis test suite. Copyright (C) 2009 Salvatore Sanfilippo antirez@gmail.com +# Server test suite. Copyright (C) 2009 Salvatore Sanfilippo antirez@gmail.com # This software is released under the BSD License. See the COPYING file for # more information. @@ -112,7 +112,7 @@ set ::next_test 0 set ::host 127.0.0.1 set ::port 6379; # port for external server -set ::baseport 21111; # initial port for spawned redis servers +set ::baseport 21111; # initial port for spawned servers set ::portcount 8000; # we don't wanna use more than 10000 to avoid collision with cluster bus ports set ::traceleaks 0 set ::valgrind 0 @@ -138,7 +138,7 @@ set ::accurate 0; # If true runs fuzz tests with more iterations set ::force_failure 0 set ::timeout 1200; # 20 minutes without progresses will quit the test. set ::last_progress [clock seconds] -set ::active_servers {} ; # Pids of active Redis instances. +set ::active_servers {} ; # Pids of active server instances. set ::dont_clean 0 set ::dont_pre_clean 0 set ::wait_server 0 @@ -154,7 +154,7 @@ set ::large_memory 0 set ::log_req_res 0 set ::force_resp3 0 -# Set to 1 when we are running in client mode. The Redis test uses a +# Set to 1 when we are running in client mode. The server test uses a # server-client model to run tests simultaneously. The server instance # runs the specified number of client instances that will actually run tests. # The server is responsible of showing the result to the user, and exit with @@ -218,7 +218,7 @@ proc r {args} { [srv $level "client"] {*}$args } -# Returns a Redis instance by index. +# Returns a server instance by index. proc Rn {n} { set level [expr -1*$n] return [srv $level "client"] @@ -909,7 +909,7 @@ proc close_replication_stream {s} { return } -# With the parallel test running multiple Redis instances at the same time +# With the parallel test running multiple server instances at the same time # we need a fast enough computer, otherwise a lot of tests may generate # false positives. # If the computer is too slow we revert the sequential test without any diff --git a/tests/unit/acl.tcl b/tests/unit/acl.tcl index cdd12511e..b69b1f40b 100644 --- a/tests/unit/acl.tcl +++ b/tests/unit/acl.tcl @@ -526,7 +526,7 @@ start_server {tags {"acl external:skip"}} { } } - # Note that the order of the generated ACL rules is not stable in Redis + # Note that the order of the generated ACL rules is not stable in the server # so we need to match the different parts and not as a whole string. test {ACL GETUSER is able to translate back command permissions} { # Subtractive diff --git a/tests/unit/bitfield.tcl b/tests/unit/bitfield.tcl index 21091aa99..2dfc77b48 100644 --- a/tests/unit/bitfield.tcl +++ b/tests/unit/bitfield.tcl @@ -114,7 +114,7 @@ start_server {tags {"bitops"}} { } set max [expr {$min+$range-1}] - # Compare Tcl vs Redis + # Compare Tcl vs the server set range2 [expr {$range*2}] set value [expr {($min*2)+[randomInt $range2]}] set increment [expr {($min*2)+[randomInt $range2]}] @@ -166,7 +166,7 @@ start_server {tags {"bitops"}} { } set max [expr {$min+$range-1}] - # Compare Tcl vs Redis + # Compare Tcl vs the server set range2 [expr {$range*2}] set value [expr {($min*2)+[randomInt $range2]}] set increment [expr {($min*2)+[randomInt $range2]}] diff --git a/tests/unit/bitops.tcl b/tests/unit/bitops.tcl index f50f65dfa..edcafdee0 100644 --- a/tests/unit/bitops.tcl +++ b/tests/unit/bitops.tcl @@ -1,4 +1,4 @@ -# Compare Redis commands against Tcl implementations of the same commands. +# Compare server commands against Tcl implementations of the same commands. proc count_bits s { binary scan $s b* bits string length [regsub -all {0} $bits {}] diff --git a/tests/unit/client-eviction.tcl b/tests/unit/client-eviction.tcl index 1fc7c02ca..2484a4d13 100644 --- a/tests/unit/client-eviction.tcl +++ b/tests/unit/client-eviction.tcl @@ -1,6 +1,6 @@ tags {"external:skip logreqres:skip"} { -# Get info about a redis client connection: +# Get info about a server client connection: # name - name of client we want to query # f - field name from "CLIENT LIST" we want to get proc client_field {name f} { @@ -27,7 +27,7 @@ proc gen_client {} { return [list $rr $name] } -# Sum a value across all redis client connections: +# Sum a value across all server client connections: # f - the field name from "CLIENT LIST" we want to sum proc clients_sum {f} { set sum 0 diff --git a/tests/unit/cluster/cli.tcl b/tests/unit/cluster/cli.tcl index 734dd19c9..b5d9e81de 100644 --- a/tests/unit/cluster/cli.tcl +++ b/tests/unit/cluster/cli.tcl @@ -1,4 +1,4 @@ -# Primitive tests on cluster-enabled redis using redis-cli +# Primitive tests on cluster-enabled server using valkey-cli source tests/support/cli.tcl @@ -87,7 +87,7 @@ start_multiple_servers 3 [list overrides $base_conf] { set endpoint_type_before_set [lindex [split [$node1 CONFIG GET cluster-preferred-endpoint-type] " "] 1] $node1 CONFIG SET cluster-preferred-endpoint-type unknown-endpoint - # when redis-cli not in cluster mode, return MOVE with empty host + # when valkey-cli not in cluster mode, return MOVE with empty host set slot_for_foo [$node1 CLUSTER KEYSLOT foo] assert_error "*MOVED $slot_for_foo :*" {$node1 set foo bar} @@ -272,7 +272,7 @@ test {Migrate the last slot away from a node using valkey-cli} { set owner_r [redis $owner_host $owner_port 0 $::tls] set owner_id [$owner_r CLUSTER MYID] - # Move slot to new node using plain Redis commands + # Move slot to new node using plain commands assert_equal OK [$newnode_r CLUSTER SETSLOT $slot IMPORTING $owner_id] assert_equal OK [$owner_r CLUSTER SETSLOT $slot MIGRATING $newnode_id] assert_equal {foo} [$owner_r CLUSTER GETKEYSINSLOT $slot 10] @@ -295,7 +295,7 @@ test {Migrate the last slot away from a node using valkey-cli} { fail "Cluster doesn't stabilize" } - # Move the only slot back to original node using redis-cli + # Move the only slot back to original node using valkey-cli exec src/valkey-cli --cluster reshard 127.0.0.1:[srv -3 port] \ --cluster-from $newnode_id \ --cluster-to $owner_id \ diff --git a/tests/unit/cluster/links.tcl b/tests/unit/cluster/links.tcl index a202c378b..4092d9983 100644 --- a/tests/unit/cluster/links.tcl +++ b/tests/unit/cluster/links.tcl @@ -191,7 +191,7 @@ start_cluster 3 0 {tags {external:skip cluster}} { # On primary1, set cluster link send buffer limit to 256KB, which is large enough to not be # overflowed by regular gossip messages but also small enough that it doesn't take too much - # memory to overflow it. If it is set too high, Redis may get OOM killed by kernel before this + # memory to overflow it. If it is set too high, the server may get OOM killed by kernel before this # limit is overflowed in some RAM-limited test environments. set oldlimit [lindex [$primary1 CONFIG get cluster-link-sendbuf-limit] 1] $primary1 CONFIG set cluster-link-sendbuf-limit [expr 256*1024] diff --git a/tests/unit/expire.tcl b/tests/unit/expire.tcl index 08fa88a10..a2554c865 100644 --- a/tests/unit/expire.tcl +++ b/tests/unit/expire.tcl @@ -187,7 +187,7 @@ start_server {tags {"expire"}} { r psetex key2 500 a r psetex key3 500 a assert_equal 3 [r dbsize] - # Redis expires random keys ten times every second so we are + # The server expires random keys ten times every second so we are # fairly sure that all the three keys should be evicted after # two seconds. wait_for_condition 20 100 { @@ -204,7 +204,7 @@ start_server {tags {"expire"}} { r psetex key2{t} 500 a r psetex key3{t} 500 a set size1 [r dbsize] - # Redis expires random keys ten times every second so we are + # The server expires random keys ten times every second so we are # fairly sure that all the three keys should be evicted after # one second. after 1000 diff --git a/tests/unit/geo.tcl b/tests/unit/geo.tcl index 6175329da..19af86399 100644 --- a/tests/unit/geo.tcl +++ b/tests/unit/geo.tcl @@ -1,5 +1,5 @@ # Helper functions to simulate search-in-radius in the Tcl side in order to -# verify the Redis implementation with a fuzzy test. +# verify the server implementation with a fuzzy test. proc geo_degrad deg {expr {$deg*(atan(1)*8/360)}} proc geo_raddeg rad {expr {$rad/(atan(1)*8/360)}} @@ -632,7 +632,7 @@ start_server {tags {"geo"}} { continue } if {$mydist < [expr {$radius_km*1000}]} { - # This is a false positive for redis since given the + # This is a false positive for the server since given the # same points the higher precision calculation provided # by TCL shows the point within range incr rounding_errors diff --git a/tests/unit/hyperloglog.tcl b/tests/unit/hyperloglog.tcl index ee437189f..c1e24ceec 100644 --- a/tests/unit/hyperloglog.tcl +++ b/tests/unit/hyperloglog.tcl @@ -167,7 +167,7 @@ start_server {tags {"hll"}} { } # Use the hyperloglog to check if it crashes - # Redis in some way. + # the server in some way. catch { r pfcount hll } diff --git a/tests/unit/introspection.tcl b/tests/unit/introspection.tcl index 1e6e38625..f6c78ea75 100644 --- a/tests/unit/introspection.tcl +++ b/tests/unit/introspection.tcl @@ -612,7 +612,7 @@ start_server {tags {"introspection"}} { } test {CONFIG SET rollback on apply error} { - # This test tries to configure a used port number in redis. This is expected + # This test tries to configure a used port number in the server. This is expected # to pass the `CONFIG SET` validity checking implementation but fail on # actual "apply" of the setting. This will validate that after an "apply" # failure we rollback to the previous values. @@ -645,7 +645,7 @@ start_server {tags {"introspection"}} { set used_port [find_available_port $::baseport $::portcount] dict set some_configs port $used_port - # Run a dummy server on used_port so we know we can't configure redis to + # Run a dummy server on used_port so we know we can't configure the server to # use it. It's ok for this to fail because that means used_port is invalid # anyway catch {socket -server dummy_accept -myaddr 127.0.0.1 $used_port} e diff --git a/tests/unit/maxmemory.tcl b/tests/unit/maxmemory.tcl index 363dab472..bbf43c2f1 100644 --- a/tests/unit/maxmemory.tcl +++ b/tests/unit/maxmemory.tcl @@ -272,7 +272,7 @@ start_server {tags {"maxmemory external:skip"}} { incr numkeys } # Now we add the same number of volatile keys already added. - # We expect Redis to evict only volatile keys in order to make + # We expect the server to evict only volatile keys in order to make # space. set err 0 for {set j 0} {$j < $numkeys} {incr j} { @@ -435,7 +435,7 @@ start_server {tags {"maxmemory external:skip"}} { # Next writing command will trigger evicting some keys if last # command trigger DB dict rehash r set k2 v2 - # There must be 4098 keys because redis doesn't evict keys. + # There must be 4098 keys because the server doesn't evict keys. r dbsize } {4098} } diff --git a/tests/unit/moduleapi/async_rm_call.tcl b/tests/unit/moduleapi/async_rm_call.tcl index 1bf12de23..d03cfc25c 100644 --- a/tests/unit/moduleapi/async_rm_call.tcl +++ b/tests/unit/moduleapi/async_rm_call.tcl @@ -165,7 +165,7 @@ start_server {tags {"modules"}} { $rd do_rm_call_async blpop l 0 wait_for_blocked_clients_count 1 - #become a replica of a not existing redis + #become a replica of a not existing server r replicaof localhost 30000 catch {[$rd read]} e diff --git a/tests/unit/moduleapi/auth.tcl b/tests/unit/moduleapi/auth.tcl index c7c2def77..aae57535e 100644 --- a/tests/unit/moduleapi/auth.tcl +++ b/tests/unit/moduleapi/auth.tcl @@ -21,7 +21,7 @@ start_server {tags {"modules"}} { assert_equal [r auth.changecount] 0 r auth.createmoduleuser - # Catch the I/O exception that was thrown when Redis + # Catch the I/O exception that was thrown when the server # disconnected with us. catch { [r ping] } e assert_match {*I/O*} $e diff --git a/tests/unit/moduleapi/blockedclient.tcl b/tests/unit/moduleapi/blockedclient.tcl index 22b2c4bae..abefaff27 100644 --- a/tests/unit/moduleapi/blockedclient.tcl +++ b/tests/unit/moduleapi/blockedclient.tcl @@ -151,7 +151,7 @@ foreach call_type {nested normal} { $rd slow_fg_command 200000 } $rd flush - after 10 ;# try to make sure redis started running the command before we proceed + after 10 ;# try to make sure the server started running the command before we proceed # make sure we didn't get BUSY error, it simply blocked till the command was done r ping diff --git a/tests/unit/moduleapi/cluster.tcl b/tests/unit/moduleapi/cluster.tcl index 4c0a49d48..d24082ec4 100644 --- a/tests/unit/moduleapi/cluster.tcl +++ b/tests/unit/moduleapi/cluster.tcl @@ -1,4 +1,4 @@ -# Primitive tests on cluster-enabled redis with modules +# Primitive tests on cluster-enabled server with modules source tests/support/cli.tcl diff --git a/tests/unit/moduleapi/defrag.tcl b/tests/unit/moduleapi/defrag.tcl index b2e23967e..e169f8de9 100644 --- a/tests/unit/moduleapi/defrag.tcl +++ b/tests/unit/moduleapi/defrag.tcl @@ -7,7 +7,7 @@ start_server {tags {"modules"} overrides {{save ""}}} { r config set active-defrag-threshold-lower 0 r config set active-defrag-cycle-min 99 - # try to enable active defrag, it will fail if redis was compiled without it + # try to enable active defrag, it will fail if the server was compiled without it catch {r config set activedefrag yes} e if {[r config get activedefrag] eq "activedefrag yes"} { diff --git a/tests/unit/moduleapi/misc.tcl b/tests/unit/moduleapi/misc.tcl index da2ca8489..7bee0ea2b 100644 --- a/tests/unit/moduleapi/misc.tcl +++ b/tests/unit/moduleapi/misc.tcl @@ -549,7 +549,7 @@ if {[string match {*jemalloc*} [s mem_allocator]]} { test {test RM_Call with large arg for SET command} { # set a big value to trigger increasing the query buf r set foo [string repeat A 100000] - # set a smaller value but > PROTO_MBULK_BIG_ARG (32*1024) Redis will try to save the query buf itself on the DB. + # set a smaller value but > PROTO_MBULK_BIG_ARG (32*1024) the server will try to save the query buf itself on the DB. r test.call_generic set bar [string repeat A 33000] # asset the value was trimmed assert {[r memory usage bar] < 42000}; # 42K to count for Jemalloc's additional memory overhead. diff --git a/tests/unit/moduleapi/moduleauth.tcl b/tests/unit/moduleapi/moduleauth.tcl index 82f42f5d1..a9eb0561c 100644 --- a/tests/unit/moduleapi/moduleauth.tcl +++ b/tests/unit/moduleapi/moduleauth.tcl @@ -291,7 +291,7 @@ start_server {tags {"modules"}} { r acl setuser foo >pwd on ~* &* +@all set rd [redis_deferring_client] - # Attempt blocking module auth and disable the Redis user while module auth is in progress. + # Attempt blocking module auth and disable the user while module auth is in progress. $rd AUTH foo pwd wait_for_blocked_clients_count 1 r acl setuser foo >pwd off ~* &* +@all @@ -339,8 +339,8 @@ start_server {tags {"modules"}} { r acl setuser foo >defaultpwd on ~* &* +@all set rd [redis_deferring_client] - # Start the module auth attempt with the standard Redis auth password for the user. This - # will result in all module auth cbs attempted and then standard Redis auth will be tried. + # Start the module auth attempt with the standard auth password for the user. This + # will result in all module auth cbs attempted and then standard auth will be tried. $rd AUTH foo defaultpwd wait_for_blocked_clients_count 1 diff --git a/tests/unit/moduleapi/rdbloadsave.tcl b/tests/unit/moduleapi/rdbloadsave.tcl index 9319c9385..b0e6d5422 100644 --- a/tests/unit/moduleapi/rdbloadsave.tcl +++ b/tests/unit/moduleapi/rdbloadsave.tcl @@ -32,10 +32,10 @@ start_server {tags {"modules"}} { assert_equal [r dbsize] 0 # Send commands with pipeline. First command will call RM_RdbLoad() in - # the command callback. While loading RDB, Redis can go to networking to + # the command callback. While loading RDB, the server can go to networking to # reply -LOADING. By sending commands in pipeline, we verify it doesn't # cause a problem. - # e.g. Redis won't try to process next message of the current client + # e.g. the server won't try to process next message of the current client # while it is in the command callback for that client . set rd1 [redis_deferring_client] $rd1 test.rdbload blabla.rdb diff --git a/tests/unit/multi.tcl b/tests/unit/multi.tcl index 85d20ddf3..80765e69c 100644 --- a/tests/unit/multi.tcl +++ b/tests/unit/multi.tcl @@ -883,7 +883,7 @@ start_server {tags {"multi"}} { r set foo bar r config set maxmemory bla - # letting the redis parser read it, it'll throw an exception instead of + # letting the server parser read it, it'll throw an exception instead of # reply with an array that contains an error, so we switch to reading # raw RESP instead r readraw 1 diff --git a/tests/unit/obuf-limits.tcl b/tests/unit/obuf-limits.tcl index 45efc26b4..42185fa3d 100644 --- a/tests/unit/obuf-limits.tcl +++ b/tests/unit/obuf-limits.tcl @@ -131,7 +131,7 @@ start_server {tags {"obuf-limits external:skip logreqres:skip"}} { $rd flush after 100 - # Before we read reply, redis will close this client. + # Before we read reply, the server will close this client. set clients [r client list] assert_no_match "*name=mybiglist*" $clients set cur_mem [s used_memory] @@ -143,7 +143,7 @@ start_server {tags {"obuf-limits external:skip logreqres:skip"}} { assert_equal {} [$rd rawread] } - # Note: This test assumes that what's written with one write, will be read by redis in one read. + # Note: This test assumes that what's written with one write, will be read by the server in one read. # this assumption is wrong, but seem to work empirically (for now) test {No response for multi commands in pipeline if client output buffer limit is enforced} { r config set client-output-buffer-limit {normal 100000 0 0} @@ -154,7 +154,7 @@ start_server {tags {"obuf-limits external:skip logreqres:skip"}} { $rd2 client setname multicommands assert_equal "OK" [$rd2 read] - # Let redis sleep 1s firstly + # Let the server sleep 1s firstly $rd1 debug sleep 1 $rd1 flush after 100 @@ -162,7 +162,7 @@ start_server {tags {"obuf-limits external:skip logreqres:skip"}} { # Create a pipeline of commands that will be processed in one socket read. # It is important to use one write, in TLS mode independent writes seem # to wait for response from the server. - # Total size should be less than OS socket buffer, redis can + # Total size should be less than OS socket buffer, the server can # execute all commands in this pipeline when it wakes up. set buf "" for {set i 0} {$i < 15} {incr i} { diff --git a/tests/unit/scan.tcl b/tests/unit/scan.tcl index d980a52ad..49939288f 100644 --- a/tests/unit/scan.tcl +++ b/tests/unit/scan.tcl @@ -109,7 +109,7 @@ proc test_scan {type} { after 2 - # TODO: remove this in redis 8.0 + # TODO: remove this in server version 8.0 set cur 0 set keys {} while 1 { @@ -124,7 +124,7 @@ proc test_scan {type} { # make sure that expired key have been removed by scan command assert_equal 1000 [scan [regexp -inline {keys\=([\d]*)} [r info keyspace]] keys=%d] - # TODO: uncomment in redis 8.0 + # TODO: uncomment in server version 8.0 #assert_error "*unknown type name*" {r scan 0 type "string1"} # expired key will be no touched by scan command #assert_equal 1001 [scan [regexp -inline {keys\=([\d]*)} [r info keyspace]] keys=%d] @@ -193,7 +193,7 @@ proc test_scan {type} { # make sure that expired key have been removed by scan command assert_equal 1000 [scan [regexp -inline {keys\=([\d]*)} [r info keyspace]] keys=%d] - # TODO: uncomment in redis 8.0 + # TODO: uncomment in server version 8.0 # make sure that only the expired key in the type match will been removed by scan command #assert_equal 1001 [scan [regexp -inline {keys\=([\d]*)} [r info keyspace]] keys=%d] diff --git a/tests/unit/scripting.tcl b/tests/unit/scripting.tcl index feef69122..b45099519 100644 --- a/tests/unit/scripting.tcl +++ b/tests/unit/scripting.tcl @@ -377,7 +377,7 @@ start_server {tags {"scripting"}} { test {EVAL - JSON numeric decoding} { # We must return the table as a string because otherwise - # Redis converts floats to ints and we get 0 and 1023 instead + # the server converts floats to ints and we get 0 and 1023 instead # of 0.0003 and 1023.2 as the parsed output. run_script {return table.concat( @@ -1414,7 +1414,7 @@ start_server {tags {"scripting repl external:skip"}} { } } - # replicate_commands is the default on Redis Function + # replicate_commands is the default on server Functions test "Redis.replicate_commands() can be issued anywhere now" { r eval { redis.call('set','foo','bar'); @@ -2227,7 +2227,7 @@ start_server {tags {"scripting"}} { test "Consistent eval error reporting" { r config resetstat r config set maxmemory 1 - # Script aborted due to Redis state (OOM) should report script execution error with detailed internal error + # Script aborted due to server state (OOM) should report script execution error with detailed internal error assert_error {OOM command not allowed when used memory > 'maxmemory'*} { r eval {return redis.call('set','x','y')} 1 x } @@ -2236,7 +2236,7 @@ start_server {tags {"scripting"}} { assert_match {calls=0*rejected_calls=1,failed_calls=0*} [cmdrstat set r] assert_match {calls=1*rejected_calls=0,failed_calls=1*} [cmdrstat eval r] - # redis.pcall() failure due to Redis state (OOM) returns lua error table with Redis error message without '-' prefix + # redis.pcall() failure due to server state (OOM) returns lua error table with server error message without '-' prefix r config resetstat assert_equal [ r eval { @@ -2268,7 +2268,7 @@ start_server {tags {"scripting"}} { r config set maxmemory 0 r config resetstat - # Script aborted due to error result of Redis command + # Script aborted due to error result of server command assert_error {ERR DB index is out of range*} { r eval {return redis.call('select',99)} 0 } @@ -2277,7 +2277,7 @@ start_server {tags {"scripting"}} { assert_match {calls=1*rejected_calls=0,failed_calls=1*} [cmdrstat select r] assert_match {calls=1*rejected_calls=0,failed_calls=1*} [cmdrstat eval r] - # redis.pcall() failure due to error in Redis command returns lua error table with redis error message without '-' prefix + # redis.pcall() failure due to error in server command returns lua error table with server error message without '-' prefix r config resetstat assert_equal [ r eval { @@ -2304,7 +2304,7 @@ start_server {tags {"scripting"}} { assert_match {calls=0*rejected_calls=1,failed_calls=0*} [cmdrstat set r] assert_match {calls=1*rejected_calls=0,failed_calls=1*} [cmdrstat eval_ro r] - # redis.pcall() failure due to scripting specific error state (write cmd with eval_ro) returns lua error table with Redis error message without '-' prefix + # redis.pcall() failure due to scripting specific error state (write cmd with eval_ro) returns lua error table with server error message without '-' prefix r config resetstat assert_equal [ r eval_ro { diff --git a/tests/unit/sort.tcl b/tests/unit/sort.tcl index a46f77cf9..397e7e12e 100644 --- a/tests/unit/sort.tcl +++ b/tests/unit/sort.tcl @@ -12,7 +12,7 @@ start_server { r del tosort for {set i 0} {$i < $num} {incr i} { # Make sure all the weights are different because - # Redis does not use a stable sort but Tcl does. + # the server does not use a stable sort but Tcl does. while 1 { randpath { set rint [expr int(rand()*1000000)] diff --git a/tests/unit/tracking.tcl b/tests/unit/tracking.tcl index 666b5930e..ee28c0a91 100644 --- a/tests/unit/tracking.tcl +++ b/tests/unit/tracking.tcl @@ -745,7 +745,7 @@ start_server {tags {"tracking network logreqres:skip"}} { test {Regression test for #11715} { # This issue manifests when a client invalidates keys through the max key - # limit, which invalidates keys to get Redis below the limit, but no command is + # limit, which invalidates keys to get the server below the limit, but no command is # then executed. This can occur in several ways but the simplest is through # multi-exec which queues commands. clean_all diff --git a/tests/unit/type/stream.tcl b/tests/unit/type/stream.tcl index 06f58c8a2..68648aab7 100644 --- a/tests/unit/type/stream.tcl +++ b/tests/unit/type/stream.tcl @@ -32,7 +32,7 @@ proc streamRandomID {min_id max_id} { return $ms-$seq } -# Tcl-side implementation of XRANGE to perform fuzz testing in the Redis +# Tcl-side implementation of XRANGE to perform fuzz testing in the server # XRANGE implementation. proc streamSimulateXRANGE {items start end} { set res {} diff --git a/tests/unit/type/string.tcl b/tests/unit/type/string.tcl index 94702ec3d..381cc4a69 100644 --- a/tests/unit/type/string.tcl +++ b/tests/unit/type/string.tcl @@ -501,7 +501,7 @@ if {[string match {*jemalloc*} [s mem_allocator]]} { test {trim on SET with big value} { # set a big value to trigger increasing the query buf r set key [string repeat A 100000] - # set a smaller value but > PROTO_MBULK_BIG_ARG (32*1024) Redis will try to save the query buf itself on the DB. + # set a smaller value but > PROTO_MBULK_BIG_ARG (32*1024) the server will try to save the query buf itself on the DB. r set key [string repeat A 33000] # asset the value was trimmed assert {[r memory usage key] < 42000}; # 42K to count for Jemalloc's additional memory overhead. diff --git a/tests/unit/type/zset.tcl b/tests/unit/type/zset.tcl index 03f451c79..fd24e418f 100644 --- a/tests/unit/type/zset.tcl +++ b/tests/unit/type/zset.tcl @@ -1826,7 +1826,7 @@ start_server {tags {"zset"}} { # Make sure data is the same in both sides assert {[r zrange zset 0 -1] eq $lexset} - # Get the Redis output + # Get the server output set output [r $cmd zset $cmin $cmax] if {$rev} { set outlen [r zlexcount zset $cmax $cmin] @@ -1842,7 +1842,7 @@ start_server {tags {"zset"}} { # Empty output when ranges are inverted. } else { if {$rev} { - # Invert the Tcl array using Redis itself. + # Invert the Tcl array using the server itself. set copy [r zrevrange zset 0 -1] # Invert min / max as well lassign [list $min $max $mininc $maxinc] \ diff --git a/utils/generate-command-code.py b/utils/generate-command-code.py index 673ef2846..05e218e78 100755 --- a/utils/generate-command-code.py +++ b/utils/generate-command-code.py @@ -576,7 +576,7 @@ with open("%s/%s.def" % (srcdir, commands_filename), "w") as f: """ /* We have fabulous commands from * the fantastic - * Redis Command Table! */ + * Command Table! */ /* Must match serverCommandGroup */ const char *COMMAND_GROUP_STR[] = { diff --git a/utils/hyperloglog/hll-err.rb b/utils/hyperloglog/hll-err.rb index 2c71ac5ef..e04cf9380 100644 --- a/utils/hyperloglog/hll-err.rb +++ b/utils/hyperloglog/hll-err.rb @@ -1,7 +1,7 @@ # hll-err.rb - Copyright (C) 2014 Salvatore Sanfilippo # BSD license, See the COPYING file for more information. # -# Check error of HyperLogLog Redis implementation for different set sizes. +# Check error of HyperLogLog implementation for different set sizes. require 'rubygems' require 'redis' diff --git a/utils/hyperloglog/hll-gnuplot-graph.rb b/utils/hyperloglog/hll-gnuplot-graph.rb index 6c7596d17..61f067263 100644 --- a/utils/hyperloglog/hll-gnuplot-graph.rb +++ b/utils/hyperloglog/hll-gnuplot-graph.rb @@ -2,7 +2,7 @@ # BSD license, See the COPYING file for more information. # # This program is suited to output average and maximum errors of -# the Redis HyperLogLog implementation in a format suitable to print +# the HyperLogLog implementation in a format suitable to print # graphs using gnuplot. require 'rubygems' @@ -12,7 +12,7 @@ require 'digest/sha1' # Generate an array of [cardinality,relative_error] pairs # in the 0 - max range, with the specified step. # -# 'r' is the Redis object used to perform the queries. +# 'r' is the Object used to perform the queries. # 'seed' must be different every time you want a test performed # with a different set. The function guarantees that if 'seed' is the # same, exactly the same dataset is used, and when it is different, diff --git a/utils/install_server.sh b/utils/install_server.sh index e22d88bb4..6a1f26d64 100755 --- a/utils/install_server.sh +++ b/utils/install_server.sh @@ -25,7 +25,7 @@ # ################################################################################ # -# Service installer for redis server, runs interactively by default. +# Service installer for the server, runs interactively by default. # # To run this script non-interactively (for automation/provisioning purposes), # feed the variables into the script. Any missing variables will be prompted! @@ -37,9 +37,9 @@ # REDIS_CONFIG_FILE=/etc/redis/1234.conf \ # REDIS_LOG_FILE=/var/log/redis_1234.log \ # REDIS_DATA_DIR=/var/lib/redis/1234 \ -# REDIS_EXECUTABLE=`command -v redis-server` ./utils/install_server.sh +# REDIS_EXECUTABLE=`command -v valkey-server` ./utils/install_server.sh # -# This generates a redis config file and an /etc/init.d script, and installs them. +# This generates a server config file and an /etc/init.d script, and installs them. # # /!\ This script should be run as root # @@ -85,7 +85,7 @@ unset _pid_1_exe if ! echo $REDIS_PORT | egrep -q '^[0-9]+$' ; then _MANUAL_EXECUTION=true - #Read the redis port + #Read the server port read -p "Please select the redis port for this instance: [$_REDIS_PORT] " REDIS_PORT if ! echo $REDIS_PORT | egrep -q '^[0-9]+$' ; then echo "Selecting default: $_REDIS_PORT" @@ -95,7 +95,7 @@ fi if [ -z "$REDIS_CONFIG_FILE" ] ; then _MANUAL_EXECUTION=true - #read the redis config file + #read the server config file _REDIS_CONFIG_FILE="/etc/redis/$REDIS_PORT.conf" read -p "Please select the redis config file name [$_REDIS_CONFIG_FILE] " REDIS_CONFIG_FILE if [ -z "$REDIS_CONFIG_FILE" ] ; then @@ -106,7 +106,7 @@ fi if [ -z "$REDIS_LOG_FILE" ] ; then _MANUAL_EXECUTION=true - #read the redis log file path + #read the server log file path _REDIS_LOG_FILE="/var/log/redis_$REDIS_PORT.log" read -p "Please select the redis log file name [$_REDIS_LOG_FILE] " REDIS_LOG_FILE if [ -z "$REDIS_LOG_FILE" ] ; then @@ -117,7 +117,7 @@ fi if [ -z "$REDIS_DATA_DIR" ] ; then _MANUAL_EXECUTION=true - #get the redis data directory + #get the server data directory _REDIS_DATA_DIR="/var/lib/redis/$REDIS_PORT" read -p "Please select the data directory for this instance [$_REDIS_DATA_DIR] " REDIS_DATA_DIR if [ -z "$REDIS_DATA_DIR" ] ; then @@ -128,7 +128,7 @@ fi if [ ! -x "$REDIS_EXECUTABLE" ] ; then _MANUAL_EXECUTION=true - #get the redis executable path + #get the server executable path _REDIS_EXECUTABLE=`command -v redis-server` read -p "Please select the redis executable path [$_REDIS_EXECUTABLE] " REDIS_EXECUTABLE if [ ! -x "$REDIS_EXECUTABLE" ] ; then @@ -141,7 +141,7 @@ if [ ! -x "$REDIS_EXECUTABLE" ] ; then fi fi -#check the default for redis cli +#check the default for valkey cli CLI_EXEC=`command -v redis-cli` if [ -z "$CLI_EXEC" ] ; then CLI_EXEC=`dirname $REDIS_EXECUTABLE`"/redis-cli" diff --git a/utils/lru/lfu-simulation.c b/utils/lru/lfu-simulation.c index 60105e55b..59b5e332c 100644 --- a/utils/lru/lfu-simulation.c +++ b/utils/lru/lfu-simulation.c @@ -8,7 +8,7 @@ int keyspace_size = 1000000; time_t switch_after = 30; /* Switch access pattern after N seconds. */ struct entry { - /* Field that the LFU Redis implementation will have (we have + /* Field that the LFU implementation will have (we have * 24 bits of total space in the object->lru field). */ uint8_t counter; /* Logarithmic counter. */ uint16_t decrtime; /* (Reduced precision) time of last decrement. */ diff --git a/utils/redis-copy.rb b/utils/redis-copy.rb index 7c5c52dd6..9f8335c34 100644 --- a/utils/redis-copy.rb +++ b/utils/redis-copy.rb @@ -1,7 +1,7 @@ # redis-copy.rb - Copyright (C) 2009-2010 Salvatore Sanfilippo # BSD license, See the COPYING file for more information. # -# Copy the whole dataset from one Redis instance to another one +# Copy the whole dataset from one server instance to another one # # WARNING: this utility is deprecated and serves as a legacy adapter # for the more-robust redis-copy gem. diff --git a/utils/redis_init_script b/utils/redis_init_script index 006db87e5..da8fee41f 100755 --- a/utils/redis_init_script +++ b/utils/redis_init_script @@ -1,6 +1,6 @@ #!/bin/sh # -# Simple Redis init.d script conceived to work on Linux systems +# Simple server init.d script conceived to work on Linux systems # as it does use of the /proc filesystem. ### BEGIN INIT INFO diff --git a/utils/req-res-log-validator.py b/utils/req-res-log-validator.py index e2d471370..d9d0df71a 100755 --- a/utils/req-res-log-validator.py +++ b/utils/req-res-log-validator.py @@ -159,7 +159,7 @@ class Response(object): count = int(line[1:]) for i in range(count): field = Response(f, line_counter) - # Redis allows fields to be non-strings but JSON doesn't. + # The server allows fields to be non-strings but JSON doesn't. # Luckily, for any kind of response we can validate, the fields are # always strings (example: XINFO STREAM) # The reason we can't always convert to string is because of DEBUG PROTOCOL MAP diff --git a/utils/speed-regression.tcl b/utils/speed-regression.tcl index bf35c7db4..6802d8cd5 100755 --- a/utils/speed-regression.tcl +++ b/utils/speed-regression.tcl @@ -26,7 +26,7 @@ proc run-tests branches { continue } - # Start the Redis server + # Start the server puts " starting the server... [exec ./redis-server -v]" set pids [exec echo "port $::port\nloglevel warning\n" | ./redis-server - > /dev/null 2> /dev/null &] puts " pids: $pids" @@ -83,7 +83,7 @@ proc combine-results {results} { } proc main {} { - # Note: the first branch is only used in order to get the redis-benchmark + # Note: the first branch is only used in order to get the valkey-benchmark # executable. Tests are performed starting from the second branch. set branches { slowset 2.2.0 2.4.0 unstable slowset diff --git a/utils/tracking_collisions.c b/utils/tracking_collisions.c index f52111173..4df3e84af 100644 --- a/utils/tracking_collisions.c +++ b/utils/tracking_collisions.c @@ -1,6 +1,6 @@ /* This is a small program used in order to understand the collision rate * of CRC64 (ISO version) VS other stronger hashing functions in the context - * of hashing keys for the Redis "tracking" feature (client side caching + * of hashing keys for the "tracking" feature (client side caching * assisted by the server). * * The program attempts to hash keys with common names in the form of