gregoriusxu / booksleeve

Automatically exported from code.google.com/p/booksleeve
Other
0 stars 0 forks source link

Connection closes when -ERR received from server during open. #33

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Disable INFO or CONFIG command on server
2. Open a connection
3. Connection will be closed when -ERR unknown command response is received 
from server to the INFO or CONFIG commands sent during the open.

What is the expected output? What do you see instead?
I'd expect the connection to stay open.  The error in this case doesn't seem to 
matter.  Commands that are sent after the open has completed but before the 
unknown command response is received work correctly.

What version of the product are you using? On what operating system?
1.1.0.5

Please provide any additional information below.
I have no control over the server I connect to.  It's a slave off the master 
server and all commands considered to be unnecessary have been disabled on the 
slave.

Within Booksleeve the error response is detected and the isFatal flag set to 
false (RedisConnectionBase.cs line 385) but the connection is closed anyway in 
the catch block at line 264.  I've modified the code to get it working but I'm 
not a C# native so it would be better if an expert did that.

Original issue reported on code.google.com by stephen....@gmail.com on 28 Feb 2013 at 11:17

GoogleCodeExporter commented 8 years ago
Interesting. It uses that information to do both feature detection and 
automatic timeout handling. The latter may be less if an issue going forward 
due to TCP keepalive. It could indeed probably made to work, but a few things 
will default to earlier server versions where features did not exist. It could 
be suboptimal.

Can I ask: what is the driver to disable these? How about renaming? I had a 
command-renaming experimental code ...

Original comment by marc.gravell on 28 Feb 2013 at 11:56

GoogleCodeExporter commented 8 years ago
When I asked why the commands were disabled they said:

"Basically we have a master redis that nobody connects to but us.
And you connect to a slave that has all the commands that could mess with the 
data disabled."

Two points:
1. I'm not sure I agree with their point of view.
2. If the result of this is suboptimal then that's the data supplier's look 
out.  It would be useful to have booksleeve handle (optionally if required) the 
situation though.

Original comment by stephen....@gmail.com on 1 Mar 2013 at 12:13

GoogleCodeExporter commented 8 years ago
I don't know who the supplier here is, but personally I would have feedback for 
them:

- "info" cannot manipulate data, and is the only way of accurately determining 
server capability
- 2.6 onwards has support for read-only slaves (it is now the default) - if 
they don't want slaves becoming changed, that would be the correct way to do 
that

I will see what I can do to make it not mind about this, though.

Original comment by marc.gravell on 1 Mar 2013 at 12:43

GoogleCodeExporter commented 8 years ago

Original comment by marc.gravell on 15 Apr 2013 at 6:50

GoogleCodeExporter commented 8 years ago
When runing twemproxy as Redis proxy, the INFO / CONFIG is not supported.  And 
this cause the problem that the RedisConnection is always closed right after it 
is opened.

Original comment by gammatr...@gmail.com on 17 Oct 2013 at 4:55