}
}
-/* Sets type */
+/* Sets type and diskstore negative caching hash table */
dictType setDictType = {
dictEncObjHash, /* hash function */
NULL, /* key dup */
}
updateDictResizePolicy();
}
- } else {
+ } else if (!server.ds_enabled) {
/* If there is not a background saving in progress check if
* we have to save now */
time_t now = time(NULL);
server.list_max_ziplist_value = REDIS_LIST_MAX_ZIPLIST_VALUE;
server.set_max_intset_entries = REDIS_SET_MAX_INTSET_ENTRIES;
server.shutdown_asap = 0;
+ server.cache_flush_delay = 0;
updateLRUClock();
resetServerSaveParams();
server.slaves = listCreate();
server.monitors = listCreate();
server.unblocked_clients = listCreate();
- server.cache_flush_queue = listCreate();
- server.cache_flush_delay = 0;
+ server.cache_io_queue = listCreate();
createSharedObjects();
server.el = aeCreateEventLoop();
server.db[j].expires = dictCreate(&keyptrDictType,NULL);
server.db[j].blocking_keys = dictCreate(&keylistDictType,NULL);
server.db[j].watched_keys = dictCreate(&keylistDictType,NULL);
- if (server.ds_enabled)
+ if (server.ds_enabled) {
server.db[j].io_keys = dictCreate(&keylistDictType,NULL);
+ server.db[j].io_negcache = dictCreate(&setDictType,NULL);
+ server.db[j].io_queued = dictCreate(&setDictType,NULL);
+ }
server.db[j].id = j;
}
server.pubsub_channels = dictCreate(&keylistDictType,NULL);
/* Try to write the pid file in a best-effort way. */
FILE *fp = fopen(server.pidfile,"w");
if (fp) {
- fprintf(fp,"%d\n",getpid());
+ fprintf(fp,"%d\n",(int)getpid());
fclose(fp);
}
}