| /redis-3.2.3/src/ |
| H A D | replication.c | 91 server.repl_backlog_off = server.master_repl_offset+1; in createReplicationBacklog() 1086 server.repl_transfer_lastio = server.unixtime; in readSyncBulkPayload() 1637 server.repl_transfer_lastio = server.unixtime; in syncWithMaster() 1673 server.repl_transfer_lastio = server.unixtime; in connectWithMaster() 1730 if (server.master) freeClient(server.master); in replicationSetMaster() 1767 server.repl_down_since = server.unixtime; in replicationHandleMasterDisconnection() 1917 server.cached_master = server.master; in replicationCacheMaster() 1949 server.master = server.cached_master; in replicationResurrectCachedMaster() 1958 listAddNodeTail(server.clients,server.master); in replicationResurrectCachedMaster() 2268 server.masterhost, server.masterport); in replicationCron() [all …]
|
| H A D | server.c | 1648 execve(server.executable,server.exec_argv,environ); in restartServer() 1881 server.db = zmalloc(sizeof(redisDb)*server.dbnum); in initServer() 1885 listenToPort(server.port,server.ipfd,&server.ipfd_count) == C_ERR) in initServer() 1891 server.sofd = anetUnixServer(server.neterr,server.unixsocket, in initServer() 1892 server.unixsocketperm, server.tcp_backlog); in initServer() 1901 if (server.ipfd_count == 0 && server.sofd < 0) { in initServer() 1961 if (server.sofd > 0 && aeCreateFileEvent(server.el,server.sofd,AE_READABLE, in initServer() 1966 server.aof_fd = open(server.aof_filename, in initServer() 2459 if (server.masterhost && server.repl_slave_ro && in processCommand() 2536 if (server.sofd != -1) close(server.sofd); in closeListeningSockets() [all …]
|
| H A D | config.c | 144 … server.saveparams = zrealloc(server.saveparams,sizeof(struct saveparam)*(server.saveparamslen+1)); in appendServerSaveParams() 145 server.saveparams[server.saveparamslen].seconds = seconds; in appendServerSaveParams() 146 server.saveparams[server.saveparamslen].changes = changes; in appendServerSaveParams() 205 if (server.port < 0 || server.port > 65535) { in loadServerConfigFromString() 275 if (server.syslog_ident) zfree(server.syslog_ident); in loadServerConfigFromString() 628 if (server.cluster_enabled && server.masterhost) { in loadServerConfigFromString() 967 if (server.hz < CONFIG_MIN_HZ) server.hz = CONFIG_MIN_HZ; 968 if (server.hz > CONFIG_MAX_HZ) server.hz = CONFIG_MAX_HZ; 1220 server.masterhost, server.masterport); 1568 if (server.cluster_enabled || server.masterhost == NULL) { [all …]
|
| H A D | aof.c | 165 aeCreateFileEvent(server.el, server.aof_pipe_write_data_to_child, in aofRewriteBufferAppend() 240 server.aof_last_fsync = server.unixtime; in startAppendOnly() 305 server.aof_flush_postponed_start = server.unixtime; in flushAppendOnlyFile() 325 nwritten = write(server.aof_fd,server.aof_buf,sdslen(server.aof_buf)); in flushAppendOnlyFile() 420 if ((sdslen(server.aof_buf)+sdsavail(server.aof_buf)) < 4000) { in flushAppendOnlyFile() 430 (server.aof_child_pid != -1 || server.rdb_child_pid != -1)) in flushAppendOnlyFile() 441 server.aof_last_fsync = server.unixtime; in flushAppendOnlyFile() 443 server.unixtime > server.aof_last_fsync)) { in flushAppendOnlyFile() 445 server.aof_last_fsync = server.unixtime; in flushAppendOnlyFile() 549 server.aof_buf = sdscatlen(server.aof_buf,buf,sdslen(buf)); in feedAppendOnlyFile() [all …]
|
| H A D | cluster.c | 418 memset(server.cluster->slots,0, sizeof(server.cluster->slots)); in clusterInit() 440 server.cfd_count = 0; in clusterInit() 455 server.cfd,&server.cfd_count) == C_ERR) in clusterInit() 462 if (aeCreateFileEvent(server.el, server.cfd[j], AE_READABLE, in clusterInit() 585 if (server.masterhost == NULL && server.loading) return; in clusterAcceptHandler() 937 if (max < server.cluster->currentEpoch) max = server.cluster->currentEpoch; in clusterGetMaxEpoch() 2494 if (server.cluster->lastVoteEpoch == server.cluster->currentEpoch) { in clusterSendFailoverAuthIfNeeded() 2562 server.cluster->lastVoteEpoch = server.cluster->currentEpoch; in clusterSendFailoverAuthIfNeeded() 2838 server.cluster->failover_auth_epoch = server.cluster->currentEpoch; in clusterHandleSlaveFailover() 3029 if (server.cluster->mf_end && server.cluster->mf_end < mstime()) { in manualFailoverCheckTimeout() [all …]
|
| H A D | rdb.c | 770 if (server.rdb_checksum) in rdbSaveRio() 906 server.dirty = 0; in rdbSave() 922 if (server.aof_child_pid != -1 || server.rdb_child_pid != -1) return C_ERR; in rdbSaveBackground() 924 server.dirty_before_bgsave = server.dirty; in rdbSaveBackground() 1234 server.loading = 1; in startLoading() 1253 server.loading = 0; in stopLoading() 1259 if (server.rdb_checksum) in rdbLoadProgressCallback() 1268 if (server.masterhost && server.repl_state == REPL_STATE_TRANSFER) in rdbLoadProgressCallback() 1438 server.dirty = server.dirty - server.dirty_before_bgsave; in backgroundSaveDoneHandlerDisk() 1460 server.rdb_save_time_last = time(NULL)-server.rdb_save_time_start; in backgroundSaveDoneHandlerDisk() [all …]
|
| H A D | slowlog.c | 83 se->id = server.slowlog_entry_id++; in slowlogCreateEntry() 104 server.slowlog = listCreate(); in slowlogInit() 105 server.slowlog_entry_id = 0; in slowlogInit() 106 listSetFreeMethod(server.slowlog,slowlogFreeEntry); in slowlogInit() 114 if (duration >= server.slowlog_log_slower_than) in slowlogPushEntryIfNeeded() 118 while (listLength(server.slowlog) > server.slowlog_max_len) in slowlogPushEntryIfNeeded() 119 listDelNode(server.slowlog,listLast(server.slowlog)); in slowlogPushEntryIfNeeded() 124 while (listLength(server.slowlog) > 0) in slowlogReset() 125 listDelNode(server.slowlog,listLast(server.slowlog)); in slowlogReset() 135 addReplyLongLong(c,listLength(server.slowlog)); in slowlogCommand() [all …]
|
| H A D | networking.c | 74 if (server.tcpkeepalive) in createClient() 86 c->id = server.next_client_id++; in createClient() 629 if (listLength(server.clients) > server.maxclients) { in acceptCommonHandler() 645 if (server.protected_mode && in acceptCommonHandler() 750 if (server.current_client == c) server.current_client = NULL; in unlinkClient() 846 list *l = (c->flags & CLIENT_MONITOR) ? server.monitors : server.slaves; in freeClient() 854 server.repl_no_slaves_since = server.unixtime; in freeClient() 1261 server.current_client = c; in processInputBuffer() 1875 if (!server.clients_paused || end > server.clients_pause_end_time) in pauseClients() 1877 server.clients_paused = 1; in pauseClients() [all …]
|
| H A D | db.c | 110 server.current_client != server.master && in lookupKeyReadWithFlags() 292 c->db = &server.db[id]; in selectDb() 341 server.dirty++; in flushallCommand() 353 server.dirty++; in delCommand() 725 if (server.loading || server.sentinel_mode) in shutdownCommand() 769 server.dirty++; in renameGenericCommand() 832 server.dirty++; in moveCommand() 910 now = server.lua_caller ? server.lua_time_start : mstime(); in expireIfNeeded() 965 if (when <= mstime() && !server.loading && !server.masterhost) { in expireGenericCommand() 969 server.dirty++; in expireGenericCommand() [all …]
|
| H A D | scripting.c | 478 if (server.lua_random_dirty && !server.lua_replicate_commands) { in luaRedisGenericCommand() 482 } else if (server.masterhost && server.repl_slave_ro && in luaRedisGenericCommand() 501 if (server.maxmemory && server.lua_write_dirty == 0 && in luaRedisGenericCommand() 516 if (server.cluster_enabled && !server.loading && in luaRedisGenericCommand() 1061 server.lua = lua; in scriptingInit() 1068 lua_close(server.lua); in scriptingRelease() 1188 if (elapsed >= server.lua_time_limit && server.lua_timedout == 0) { in luaMaskCountHook() 1196 aeDeleteFileEvent(server.el, server.lua_caller->fd, AE_READABLE); in luaMaskCountHook() 1226 server.lua_replicate_commands = server.lua_always_replicate_commands; in evalGenericCommand() 1305 server.lua_kill = 0; in evalGenericCommand() [all …]
|
| H A D | latency.c | 139 di = dictGetSafeIterator(server.latency_events); in latencyResetEvent() 144 dictDelete(server.latency_events, event); in latencyResetEvent() 238 if (dictSize(server.latency_events) == 0 && in createLatencyReport() 239 server.latency_monitor_threshold == 0) in createLatencyReport() 251 di = dictGetSafeIterator(server.latency_events); in createLatencyReport() 276 if (server.stat_fork_rate < 10) { in createLatencyReport() 280 } else if (server.stat_fork_rate < 25) { in createLatencyReport() 284 } else if (server.stat_fork_rate < 100) { in createLatencyReport() 296 if (server.slowlog_log_slower_than == 0) { in createLatencyReport() 453 if (advise_hz && server.hz < 100) { in createLatencyReport() [all …]
|
| H A D | blocked.c | 103 server.bpop_blocked_clients++; in blockClient() 113 while (listLength(server.unblocked_clients)) { in processUnblockedClients() 114 ln = listFirst(server.unblocked_clients); in processUnblockedClients() 117 listDelNode(server.unblocked_clients,ln); in processUnblockedClients() 146 server.bpop_blocked_clients--; in unblockClient() 151 listAddNodeTail(server.unblocked_clients,c); in unblockClient() 178 listRewind(server.clients,&li); in disconnectAllBlockedClients()
|
| H A D | pubsub.c | 68 de = dictFind(server.pubsub_channels,channel); in pubsubSubscribeChannel() 71 dictAdd(server.pubsub_channels,channel,clients); in pubsubSubscribeChannel() 100 de = dictFind(server.pubsub_channels,channel); in pubsubUnsubscribeChannel() 110 dictDelete(server.pubsub_channels,channel); in pubsubUnsubscribeChannel() 138 listAddNodeTail(server.pubsub_patterns,pat); in pubsubSubscribePattern() 161 ln = listSearchKey(server.pubsub_patterns,&pat); in pubsubUnsubscribePattern() 162 listDelNode(server.pubsub_patterns,ln); in pubsubUnsubscribePattern() 232 de = dictFind(server.pubsub_channels,channel); in pubsubPublishMessage() 250 if (listLength(server.pubsub_patterns)) { in pubsubPublishMessage() 251 listRewind(server.pubsub_patterns,&li); in pubsubPublishMessage() [all …]
|
| H A D | latency.h | 71 #define latencyStartMonitor(var) if (server.latency_monitor_threshold) { \ 79 #define latencyEndMonitor(var) if (server.latency_monitor_threshold) { \ 85 if (server.latency_monitor_threshold && \ 86 (var) >= server.latency_monitor_threshold) \
|
| H A D | Makefile.dep | 8 aof.o: aof.c server.h fmacros.h config.h solarisfixes.h \ 13 bio.o: bio.c server.h fmacros.h config.h solarisfixes.h \ 18 bitops.o: bitops.c server.h fmacros.h config.h solarisfixes.h \ 31 config.o: config.c server.h fmacros.h config.h solarisfixes.h \ 36 crc16.o: crc16.c server.h fmacros.h config.h solarisfixes.h \ 41 db.o: db.c server.h fmacros.h config.h solarisfixes.h \ 46 debug.o: debug.c server.h fmacros.h config.h solarisfixes.h \ 70 multi.o: multi.c server.h fmacros.h config.h solarisfixes.h \ 94 rdb.o: rdb.c server.h fmacros.h config.h solarisfixes.h \ 132 server.o: server.c server.h fmacros.h config.h solarisfixes.h \ [all …]
|
| H A D | debug.c | 123 for (j = 0; j < server.dbnum; j++) { in computeDatasetDigest() 124 redisDb *db = server.db+j; in computeDatasetDigest() 560 server.assert_failed = estr; in _serverAssert() 561 server.assert_file = file; in _serverAssert() 562 server.assert_line = line; in _serverAssert() 644 server.bug_report_start = 1; in bugReportStart() 995 server.assert_file, server.assert_line); in sigsegvHandler() 1039 if (server.daemonize && server.supervised == 0) unlink(server.pidfile); in sigsegvHandler() 1126 min_period = (1000/server.hz)*2; in enableWatchdog() 1129 server.watchdog_period = period; in enableWatchdog() [all …]
|
| H A D | t_list.c | 224 server.dirty += pushed; in pushGenericCommand() 260 server.dirty++; in pushxGenericCommand() 272 server.dirty++; in pushxGenericCommand() 351 server.dirty++; in lsetCommand() 377 server.dirty++; in popGenericCommand() 477 server.dirty++; in ltrimCommand() 505 server.dirty++; in lremCommand() 589 server.dirty++; in rpoplpushCommand() 739 server.lpopCommand : server.rpopCommand, in serveClientBlockedOnList() 797 l = server.ready_keys; in handleClientsBlockedOnLists() [all …]
|
| H A D | sort.c | 142 if (!server.sort_alpha) { in sortCompare() 156 if (server.sort_bypattern) { in sortCompare() 167 if (server.sort_store) { in sortCompare() 177 if (server.sort_store) { in sortCompare() 184 return server.sort_desc ? -cmp : cmp; in sortCompare() 256 if (server.cluster_enabled) { in sortCommand() 264 if (server.cluster_enabled) { in sortCommand() 491 server.sort_desc = desc; in sortCommand() 492 server.sort_alpha = alpha; in sortCommand() 569 server.dirty += outputlen; in sortCommand() [all …]
|
| H A D | multi.c | 109 propagate(server.multiCommand,c->db->id,&multistring,1, in execCommandPropagateMulti() 172 if (must_propagate) server.dirty++; in execCommand() 180 if (listLength(server.monitors) && !server.loading) in execCommand() 181 replicationFeedMonitors(c,server.monitors,c->db->id,c->argv,c->argc); in execCommand() 289 listRewind(server.clients,&li1); in touchWatchedKeysOnFlush()
|
| H A D | notify.c | 102 if (!(server.notify_keyspace_events & type)) return; in notifyKeyspaceEvent() 107 if (server.notify_keyspace_events & NOTIFY_KEYSPACE) { in notifyKeyspaceEvent() 119 if (server.notify_keyspace_events & NOTIFY_KEYEVENT) { in notifyKeyspaceEvent()
|
| H A D | t_set.c | 295 server.dirty += added; in saddCommand() 322 server.dirty += deleted; in sremCommand() 371 server.dirty++; in smoveCommand() 375 server.dirty++; in smoveCommand() 441 server.dirty += count; in spopWithCountCommand() 457 server.dirty++; in spopWithCountCommand() 559 server.dirty++; in spopWithCountCommand() 611 server.dirty++; in spopCommand() 810 server.dirty++; in sinterGenericCommand() 920 server.dirty++; in sinterGenericCommand() [all …]
|
| H A D | t_string.c | 87 server.dirty++; in setGenericCommand() 181 server.dirty++; in getsetCommand() 239 server.dirty++; in setrangeCommand() 329 server.dirty += (c->argc-1)/2; in msetGenericCommand() 373 server.dirty++; in incrDecrCommand() 423 server.dirty++; in incrbyfloatCommand() 464 server.dirty++; in appendCommand()
|
| /redis-3.2.3/tests/unit/ |
| H A D | auth.tcl | 2 test {AUTH fails if there is no password configured server side} { 23 test {Once AUTH succeeded we can actually send commands to the server} {
|
| /redis-3.2.3/ |
| H A D | README.md | 6 …uctures* server. What this means is that Redis provides access to mutable data structures via a se… 10 * Redis cares to store them on disk, even if they are always served and modified into the server me… 111 % ./redis-server 117 % ./redis-server /path/to/redis.conf 122 % ./redis-server --port 9999 --slaveof 127.0.0.1 6379 123 % ./redis-server /etc/redis/6379.conf --loglevel debug 131 You can use redis-cli to play with Redis. Start a redis-server instance,
|
| /redis-3.2.3/tests/integration/ |
| H A D | replication-4.tcl | 22 test {First server should have role slave after SLAVEOF} { 65 test {First server should have role slave after SLAVEOF} { 107 test {First server should have role slave after SLAVEOF} {
|