/* When configuring the server eventloop, we setup it so that the total number
/* When configuring the server eventloop, we setup it so that the total number
...
@@ -764,6 +760,8 @@ struct RedisModule {
...
@@ -764,6 +760,8 @@ struct RedisModule {
list*usedby;/* List of modules using APIs from this one. */
list*usedby;/* List of modules using APIs from this one. */
list*using;/* List of modules we use some APIs of. */
list*using;/* List of modules we use some APIs of. */
list*filters;/* List of filters the module has registered. */
list*filters;/* List of filters the module has registered. */
list*module_configs;/* List of configurations the module has registered */
intconfigs_initialized;/* Have the module configurations been initialized? */
intin_call;/* RM_Call() nesting level */
intin_call;/* RM_Call() nesting level */
intin_hook;/* Hooks callback nesting level for this module (0 or 1). */
intin_hook;/* Hooks callback nesting level for this module (0 or 1). */
intoptions;/* Module options and capabilities. */
intoptions;/* Module options and capabilities. */
...
@@ -1084,10 +1082,6 @@ typedef struct client {
...
@@ -1084,10 +1082,6 @@ typedef struct client {
robj*name;/* As set by CLIENT SETNAME. */
robj*name;/* As set by CLIENT SETNAME. */
sdsquerybuf;/* Buffer we use to accumulate client queries. */
sdsquerybuf;/* Buffer we use to accumulate client queries. */
size_tqb_pos;/* The position we have read in querybuf. */
size_tqb_pos;/* The position we have read in querybuf. */
sdspending_querybuf;/* If this client is flagged as master, this buffer
represents the yet not applied portion of the
replication stream that we are receiving from
the master. */
size_tquerybuf_peak;/* Recent (100ms or more) peak of querybuf size. */
size_tquerybuf_peak;/* Recent (100ms or more) peak of querybuf size. */
intargc;/* Num of arguments of current command. */
intargc;/* Num of arguments of current command. */
robj**argv;/* Arguments of current command. */
robj**argv;/* Arguments of current command. */
...
@@ -1124,6 +1118,7 @@ typedef struct client {
...
@@ -1124,6 +1118,7 @@ typedef struct client {
sdsreplpreamble;/* Replication DB preamble. */
sdsreplpreamble;/* Replication DB preamble. */
longlongread_reploff;/* Read replication offset if this is a master. */
longlongread_reploff;/* Read replication offset if this is a master. */
longlongreploff;/* Applied replication offset if this is a master. */
longlongreploff;/* Applied replication offset if this is a master. */
longlongrepl_applied;/* Applied replication data count in querybuf, if this is a replica. */
longlongrepl_ack_off;/* Replication ack offset, if this is a slave. */
longlongrepl_ack_off;/* Replication ack offset, if this is a slave. */
longlongrepl_ack_time;/* Replication ack time, if this is a slave. */
longlongrepl_ack_time;/* Replication ack time, if this is a slave. */
longlongrepl_last_partial_write;/* The last time the server did a partial write from the RDB child pipe to this replica */
longlongrepl_last_partial_write;/* The last time the server did a partial write from the RDB child pipe to this replica */
...
@@ -1173,7 +1168,6 @@ typedef struct client {
...
@@ -1173,7 +1168,6 @@ typedef struct client {
size_tlast_memory_usage;
size_tlast_memory_usage;
intlast_memory_type;
intlast_memory_type;
size_tlast_memory_usage_on_bucket_update;
listNode*mem_usage_bucket_node;
listNode*mem_usage_bucket_node;
clientMemUsageBucket*mem_usage_bucket;
clientMemUsageBucket*mem_usage_bucket;
...
@@ -1482,6 +1476,7 @@ struct redisServer {
...
@@ -1482,6 +1476,7 @@ struct redisServer {
dict*moduleapi;/* Exported core APIs dictionary for modules. */
dict*moduleapi;/* Exported core APIs dictionary for modules. */
dict*sharedapi;/* Like moduleapi but containing the APIs that
dict*sharedapi;/* Like moduleapi but containing the APIs that
modules share with each other. */
modules share with each other. */
dict*module_configs_queue;/* Dict that stores module configurations from .conf file until after modules are loaded during startup or arguments to loadex. */
list*loadmodule_queue;/* List of modules to load at startup. */
list*loadmodule_queue;/* List of modules to load at startup. */
intmodule_pipe[2];/* Pipe used to awake the event loop by module threads. */
intmodule_pipe[2];/* Pipe used to awake the event loop by module threads. */
pid_tchild_pid;/* PID of current child */
pid_tchild_pid;/* PID of current child */
...
@@ -1584,8 +1579,8 @@ struct redisServer {
...
@@ -1584,8 +1579,8 @@ struct redisServer {
size_tstat_aof_cow_bytes;/* Copy on write bytes during AOF rewrite. */
size_tstat_aof_cow_bytes;/* Copy on write bytes during AOF rewrite. */
size_tstat_module_cow_bytes;/* Copy on write bytes during module fork. */
size_tstat_module_cow_bytes;/* Copy on write bytes during module fork. */
doublestat_module_progress;/* Module save progress. */
doublestat_module_progress;/* Module save progress. */
redisAtomicsize_tstat_clients_type_memory[CLIENT_TYPE_COUNT];/* Mem usage by type */
size_tstat_clients_type_memory[CLIENT_TYPE_COUNT];/* Mem usage by type */
size_tstat_cluster_links_memory;/* Mem usage by cluster links */
size_tstat_cluster_links_memory;/* Mem usage by cluster links */
longlongstat_unexpected_error_replies;/* Number of unexpected (aof-loading, replica to master, etc.) error replies */
longlongstat_unexpected_error_replies;/* Number of unexpected (aof-loading, replica to master, etc.) error replies */
longlongstat_total_error_replies;/* Total number of issued error replies ( command + rejected errors ) */
longlongstat_total_error_replies;/* Total number of issued error replies ( command + rejected errors ) */
longlongstat_dump_payload_sanitizations;/* Number deep dump payloads integrity validations. */
longlongstat_dump_payload_sanitizations;/* Number deep dump payloads integrity validations. */
...
@@ -1697,7 +1692,7 @@ struct redisServer {
...
@@ -1697,7 +1692,7 @@ struct redisServer {
intrdb_pipe_numconns;/* target of diskless rdb fork child. */
intrdb_pipe_numconns;/* target of diskless rdb fork child. */
intrdb_pipe_numconns_writing;/* Number of rdb conns with pending writes. */
intrdb_pipe_numconns_writing;/* Number of rdb conns with pending writes. */
char*rdb_pipe_buff;/* In diskless replication, this buffer holds data */
char*rdb_pipe_buff;/* In diskless replication, this buffer holds data */
intrdb_pipe_bufflen;/* that was read from the the rdb pipe. */
intrdb_pipe_bufflen;/* that was read from the rdb pipe. */
intrdb_key_save_delay;/* Delay in microseconds between keys while
intrdb_key_save_delay;/* Delay in microseconds between keys while
* writing the RDB. (for testings). negative
* writing the RDB. (for testings). negative
* value means fractions of microseconds (on average). */
* value means fractions of microseconds (on average). */
...
@@ -1851,7 +1846,7 @@ struct redisServer {
...
@@ -1851,7 +1846,7 @@ struct redisServer {
intcluster_slave_no_failover;/* Prevent slave from starting a failover
intcluster_slave_no_failover;/* Prevent slave from starting a failover
if the master is in failure state. */
if the master is in failure state. */
char*cluster_announce_ip;/* IP address to announce on cluster bus. */
char*cluster_announce_ip;/* IP address to announce on cluster bus. */
char*cluster_announce_hostname;/* IP address to announce on cluster bus. */
char*cluster_announce_hostname;/* hostname to announce on cluster bus. */
intcluster_preferred_endpoint_type;/* Use the announced hostname when available. */
intcluster_preferred_endpoint_type;/* Use the announced hostname when available. */
intcluster_announce_port;/* base port to announce on cluster bus. */
intcluster_announce_port;/* base port to announce on cluster bus. */
intcluster_announce_tls_port;/* TLS port to announce on cluster bus. */
intcluster_announce_tls_port;/* TLS port to announce on cluster bus. */
...
@@ -1914,6 +1909,7 @@ struct redisServer {
...
@@ -1914,6 +1909,7 @@ struct redisServer {
intcluster_allow_pubsubshard_when_down;/* Is pubsubshard allowed when the cluster
intcluster_allow_pubsubshard_when_down;/* Is pubsubshard allowed when the cluster
is down, doesn't affect pubsub global. */
is down, doesn't affect pubsub global. */
longreply_buffer_peak_reset_time;/* The amount of time (in milliseconds) to wait between reply buffer peak resets */
longreply_buffer_peak_reset_time;/* The amount of time (in milliseconds) to wait between reply buffer peak resets */
intreply_buffer_resizing_enabled;/* Is reply buffer resizing enabled (1 by default) */
};
};
#define MAX_KEYS_BUFFER 256
#define MAX_KEYS_BUFFER 256
...
@@ -2326,6 +2322,8 @@ extern dictType dbDictType;
...
@@ -2326,6 +2322,8 @@ extern dictType dbDictType;
externdoubleR_Zero,R_PosInf,R_NegInf,R_Nan;
externdoubleR_Zero,R_PosInf,R_NegInf,R_Nan;
externdictTypehashDictType;
externdictTypehashDictType;
externdictTypestringSetDictType;
externdictTypestringSetDictType;
externdictTypeexternalStringType;
externdictTypesdsHashDictType;
externdictTypedbExpiresDictType;
externdictTypedbExpiresDictType;
externdictTypemodulesDictType;
externdictTypemodulesDictType;
externdictTypesdsReplyDictType;
externdictTypesdsReplyDictType;
...
@@ -2343,7 +2341,8 @@ int populateArgsStructure(struct redisCommandArg *args);
...
@@ -2343,7 +2341,8 @@ int populateArgsStructure(struct redisCommandArg *args);