diff options
Diffstat (limited to 'src/server.h')
-rw-r--r-- | src/server.h | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/server.h b/src/server.h index 75ff384cd..8cc172149 100644 --- a/src/server.h +++ b/src/server.h @@ -63,7 +63,9 @@ typedef long long mstime_t; /* millisecond time type. */ #include "util.h" /* Misc functions useful in many places */ #include "latency.h" /* Latency monitor API */ #include "sparkline.h" /* ASCII graphs API */ -#include "quicklist.h" +#include "quicklist.h" /* Lists are encoded as linked lists of + N-elements flat arrays */ +#include "rax.h" /* Radix tree */ /* Following includes allow test functions to be called from Redis main() */ #include "zipmap.h" @@ -661,6 +663,9 @@ typedef struct client { redisDb *db; /* Pointer to currently SELECTed DB. */ robj *name; /* As set by CLIENT SETNAME. */ sds querybuf; /* Buffer we use to accumulate client queries. */ + sds pending_querybuf; /* If this is a master, this buffer represents the + yet not applied replication stream that we + are receiving from the master. */ size_t querybuf_peak; /* Recent (100ms or more) peak of querybuf size. */ int argc; /* Num of arguments of current command. */ robj **argv; /* Arguments of current command. */ @@ -683,7 +688,8 @@ typedef struct client { off_t repldboff; /* Replication DB file offset. */ off_t repldbsize; /* Replication DB file size. */ sds replpreamble; /* Replication DB preamble. */ - long long reploff; /* Replication offset if this is our master. */ + long long read_reploff; /* Read replication offset if this is a master. */ + long long reploff; /* Applied replication offset if this is a master. */ long long repl_ack_off; /* Replication ack offset, if this is a slave. */ long long repl_ack_time;/* Replication ack time, if this is a slave. */ long long psync_initial_offset; /* FULLRESYNC reply offset other slaves @@ -875,6 +881,9 @@ struct redisServer { /* Modules */ dict *moduleapi; /* Exported APIs dictionary for modules. */ list *loadmodule_queue; /* List of modules to load at startup. */ + int module_blocked_pipe[2]; /* Pipe used to awake the event loop if a + client blocked on a module command needs + to be processed. */ /* Networking */ int port; /* TCP listening port */ int tcp_backlog; /* TCP listen() backlog */ @@ -1284,6 +1293,7 @@ void moduleFreeContext(struct RedisModuleCtx *ctx); void unblockClientFromModule(client *c); void moduleHandleBlockedClients(void); void moduleBlockedClientTimedOut(client *c); +void moduleBlockedClientPipeReadable(aeEventLoop *el, int fd, void *privdata, int mask); /* Utils */ long long ustime(void); |