From 3b9cf3ed3a7e7ba518f9410f9764bf89aac335ff Mon Sep 17 00:00:00 2001 From: antirez Date: Thu, 19 Dec 2013 15:30:06 +0100 Subject: [PATCH] CONFIG REWRITE: old development comments removed. --- src/config.c | 36 ++++-------------------------------- 1 file changed, 4 insertions(+), 32 deletions(-) diff --git a/src/config.c b/src/config.c index b455c079e..e7d2b78c9 100644 --- a/src/config.c +++ b/src/config.c @@ -1126,41 +1126,13 @@ void configGetCommand(redisClient *c) { * CONFIG REWRITE implementation *----------------------------------------------------------------------------*/ -/* IGNORE: - * - * rename-command - * include - * - * Special handling: - * - * notify-keyspace-events - * client-output-buffer-limit - * save - * appendonly - * appendfsync - * dir - * maxmemory-policy - * loglevel - * unixsocketperm - * slaveof - * - * Type of config directives: - * - * CUSTOM - * VERBATIM - * YESNO - * L - * LL - * - */ - #define REDIS_CONFIG_REWRITE_SIGNATURE "# Generated by CONFIG REWRITE" /* We use the following dictionary type to store where a configuration * option is mentioned in the old configuration file, so it's * like "maxmemory" -> list of line numbers (first line is zero). */ -unsigned int dictSdsHash(const void *key); -int dictSdsKeyCompare(void *privdata, const void *key1, const void *key2); +unsigned int dictSdsCaseHash(const void *key); +int dictSdsKeyCaseCompare(void *privdata, const void *key1, const void *key2); void dictSdsDestructor(void *privdata, void *val); void dictListDestructor(void *privdata, void *val); @@ -1220,7 +1192,7 @@ void rewriteConfigAddLineNumberToOption(struct rewriteConfigState *state, sds op void rewriteConfigMarkAsProcessed(struct rewriteConfigState *state, char *option) { sds opt = sdsnew(option); - if (dictAdd(state->rewritten,opt) != DICT_OK) sdsfree(opt); + if (dictAdd(state->rewritten,opt,NULL) != DICT_OK) sdsfree(opt); } /* Read the old file, split it into lines to populate a newly created @@ -1617,7 +1589,7 @@ void rewriteConfigRemoveOrphaned(struct rewriteConfigState *state) { /* Don't blank lines about options the rewrite process * don't understand. */ - if (dictFetch(state->rewritten,option) == NULL) { + if (dictFetchValue(state->rewritten,option) == NULL) { redisLog(REDIS_DEBUG,"Not rewritten option: %s", option); continue; }