solomonHou / redis

Automatically exported from code.google.com/p/redis
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

The issue about the special scenario in redis-2.2.12 #659

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I found a potential issue about redis-2.2.12 in my development
procedure. my operation platform is LINUX Enterprise AS4. can you help me check 
it?

I apply a scenario which is that we use two servers which
are master and slave each other in my project.  when I do
the operator just like "APPEND" in one client , I find sometime
I can not get the correct value,but when I use the command
"STRLEN", redis show the length is correct. for example, at
first, I use the command "SET" to create a map("test" ==>
"hello"), after that, I use "APPEND" to append "world", but
when I use "GET" to check the value, sometime the redis show me
the value is still "hello" except for "helloworld", but I use
the "STRLEN", redis show me the length is 11, that is correct.

on the other hand, I also test the PUB/SUB, when I publish two
messages in one client and the two clients are also monitor the
message by using "subscribe", the result is that the two
clients can receive more than two same messages, enve if one of
them goes into a dead loop to receive the same messages.

but when I use another scenario which is that we use a server
as master, another server is as its' slave, the results just I
mentioned the previous scenario are correct.

so I wonder whether redis can not support the senario which is
that the two servers are master-slave each other or not.  it is
a urgen application in my project,  can you give me some idea
about it? thanks!

Original issue reported on code.google.com by weiming2...@gmail.com on 10 Sep 2011 at 3:23

GoogleCodeExporter commented 8 years ago
Each server is a slave of the other? Redis does not currently support any kind 
of multi-master replication, so that will not work. Everything should work as 
long as you only have one master.

Perhaps the documentation could be improved regarding this. Not sure.

Original comment by hampus.w...@gmail.com on 10 Sep 2011 at 4:07

GoogleCodeExporter commented 8 years ago
Hi redis,
Thanks for your response. yes, Each server is a slave of the other, at the
same time, Each server is a master of the other. the scenario I mentioned is
that the two servers is as the role of master and slave of each other. I
hope they can support that when I write data into any server, the data can
be sychronized to other servers. Because as far the redis only support when
I write data or publish data in master server, the data can be sychronized
or received in other slave server which mornitor the subscription operation.

so , I hope in the future the redis can support the below features,
1) multi-master configruation and  replication in same application.
2) when I write and publish data into the slave server, the data can be
sychronized to any server.

thanks to let me know the result about the sepcial scenario  just I
mentioned, so I only modify the architecture of project in order to meet the
feature of redis.

Best Regests,
weiming

Original comment by weiming2...@gmail.com on 10 Sep 2011 at 10:24

GoogleCodeExporter commented 8 years ago
No problem. It's always nice when people show an interest in Redis! 
Multi-master replication could perhaps be an interesting feature to have at 
some point... There seem to be others interested in that too.

Original comment by hampus.w...@gmail.com on 11 Sep 2011 at 6:14

GoogleCodeExporter commented 8 years ago
Hey, we plan to go for cluster to start, that also allows for high availability 
(but at least three nodes are needed). If this solution will not be good enough 
for standard HA setups we'll look at multi-master.

Cheers!

Original comment by anti...@gmail.com on 12 Sep 2011 at 12:24

GoogleCodeExporter commented 8 years ago
To respond back to weiming: if you have two Redis instances that are slaving 
against each other, I'm surprised you can run any commands against them at all. 
To me, it would seem like you would get a command loop, where a command to 
instance A would sync to B, then back to A again.

Without doing anything else, you should watch how quickly the 'commands 
processed' output from INFO increments with your current configuration.

Original comment by josiah.c...@gmail.com on 12 Sep 2011 at 6:47