summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2012-09-27 13:10:36 +0200
committerantirez <antirez@gmail.com>2012-09-27 13:10:36 +0200
commitc4cbffa3a1b7f83fd27359961b4d9e287847c4b6 (patch)
tree5beced470043c2aa861f5ec39225c7d0e2c637ab
parentdfb7194cba92a7e9f86e24aacaabcd756aac5b12 (diff)
downloadredis-c4cbffa3a1b7f83fd27359961b4d9e287847c4b6.tar.gz
Final merge of Sentinel into 2.6.
After cherry-picking Sentinel commits a few spurious issues remained about references to Redis Cluster that is not present in the 2.6 branch.
-rw-r--r--src/redis.c24
1 files changed, 8 insertions, 16 deletions
diff --git a/src/redis.c b/src/redis.c
index e5d06f8e2..0656d7c29 100644
--- a/src/redis.c
+++ b/src/redis.c
@@ -1827,8 +1827,7 @@ sds genRedisInfoString(char *section) {
struct utsname name;
char *mode;
- if (server.cluster_enabled) mode = "cluster";
- else if (server.sentinel_mode) mode = "sentinel";
+ if (server.sentinel_mode) mode = "sentinel";
else mode = "standalone";
if (sections++) info = sdscat(info,"\r\n");
@@ -2415,20 +2414,14 @@ void redisAsciiArt(void) {
char *buf = zmalloc(1024*16);
char *mode = "stand alone";
- if (server.cluster_enabled) mode = "cluster";
- else if (server.sentinel_mode) mode = "sentinel";
+ if (server.sentinel_mode) mode = "sentinel";
snprintf(buf,1024*16,ascii_logo,
REDIS_VERSION,
redisGitSHA1(),
strtol(redisGitDirty(),NULL,10) > 0,
(sizeof(long) == 8) ? "64" : "32",
-<<<<<<< HEAD
- "stand alone",
- server.port,
-=======
mode, server.port,
->>>>>>> 6b5daa2... First implementation of Redis Sentinel.
(long) getpid()
);
redisLogRaw(REDIS_NOTICE|REDIS_LOG_RAW,buf);
@@ -2466,12 +2459,6 @@ void setupSignalHandlers(void) {
void memtest(size_t megabytes, int passes);
-<<<<<<< HEAD
-void redisOutOfMemoryHandler(size_t allocation_size) {
- redisLog(REDIS_WARNING,"Out Of Memory allocating %zu bytes!",
- allocation_size);
- redisPanic("OOM");
-=======
/* Returns 1 if there is --sentinel among the arguments or if
* argv[0] is exactly "redis-sentinel". */
int checkForSentinelMode(int argc, char **argv) {
@@ -2498,7 +2485,12 @@ void loadDataFromDisk(void) {
exit(1);
}
}
->>>>>>> 6b5daa2... First implementation of Redis Sentinel.
+}
+
+void redisOutOfMemoryHandler(size_t allocation_size) {
+ redisLog(REDIS_WARNING,"Out Of Memory allocating %zu bytes!",
+ allocation_size);
+ redisPanic("OOM");
}
int main(int argc, char **argv) {