1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-06 02:15:48 +03:00
Commit Graph

384 Commits

Author SHA1 Message Date
Matt Ranney
2fcc947f11 Add MONITOR command and special monitor command reply parsing. 2011-03-14 15:50:47 -10:00
Matt Ranney
1a14e24faa Add magical auth command.
Authentication is now remembered by the client and will be automatically sent to the server
on every connection, including any reconnections.
2011-02-27 23:10:44 -10:00
Matt Ranney
29e09c1c16 Fix bug in ready check with return_buffers set to true.
Thanks to Dean Mao and Austin Chau.
2011-02-22 21:10:50 -10:00
Matt Ranney
ee93d1b91b Add probe for server readiness.
When a Redis server starts up, it might take a while to load the dataset into memory.
During this time, the server will accept connections, but will return errors for all non-INFO
commands.  Now node_redis will send an INFO command whenever it connects to a server.
If the info command indicates that the server is not ready, the client will keep trying until
the server is ready.  Once it is ready, the client will emit a "ready" event as well as the
"connect" event.  The client will queue up all commands sent before the server is ready, just
like it did before.  When the server is ready, all offline/non-ready commands will be replayed.
This should be backward compatible with previous versions.

To disable this ready check behavior, set `options.no_ready_check` when creating the client.

As a side effect of this change, the key/val params from the info command are available as
`client.server_options`.  Further, the version string is decomposed into individual elements
in `client.server_options.versions`.
2011-02-16 15:46:27 -10:00
Matt Ranney
0f907401f0 Fix excess memory consumption from Queue backing store.
Thanks to Gustaf Sjöberg.
2011-02-11 00:12:00 -10:00
Matt Ranney
efadbc8582 Fix multi/exec error reply callback logic.
Thanks to Stella Laurenzo.
2011-02-05 19:54:40 -10:00
Matt Ranney
2d7869261a Fix bug where unhandled error replies confuse the parser. 2011-01-19 18:14:32 -08:00
nithesh
8787d81abf Added support for new BIT-related commands. 2011-01-18 17:08:48 -08:00
Matt Ranney
c1b5587e74 Fix bug where subscribe commands would not handle redis-server startup error properly. 2011-01-18 13:56:53 -08:00
Matt Ranney
fc5968c96c Merge branch 'master' of github.com:mranney/node_redis 2011-01-18 11:42:22 -08:00
Matt Ranney
ccce845cc2 Some bug fixes:
* An important bug fix in reconnection logic.  Previously, reply callbacks would be invoked twice after
  a reconnect.
* Changed error callback argument to be an actual Error object.

New feature:

* Add friendly syntax for HMSET using an object.
2010-12-29 17:48:40 -08:00
Matt Ranney
9b28851ab0 Remove extra call to EventEmitter constructor. 2010-12-16 16:47:34 -08:00
Matt Ranney
202df58b93 Re-throw callback errors on nextTick
Otherwise an error thrown in a callback would be throw on the parser's stack.
2010-12-13 12:46:54 -08:00
Matt Ranney
cfe0df1c3f Remove warning about missing hiredis. You probably do want it though. 2010-12-08 18:42:07 -08:00
Matt Ranney
b907364573 Support for multiple reply parsers including hiredis.
Several parsing bugs fixed in JavaScript.
Some new config options that need to be better documented.
2010-12-06 09:11:16 -08:00
Pieter Noordhuis
a5381964d9 Add option to specify whether to return strings or buffers for bulk data 2010-11-30 23:10:02 +01:00
Pieter Noordhuis
4bef57cff0 Try to use hiredis as default reply parser 2010-11-30 22:40:09 +01:00
Pieter Noordhuis
1e698e3fce Move the reply parser to its own file 2010-11-30 22:29:16 +01:00
Pieter Noordhuis
88711fe4fe Move requiring util to a separate file 2010-11-30 22:19:24 +01:00
Matt Ranney
12d2aebb70 Send empty Array for 0 length mb replies instead of null. 2010-11-30 13:05:07 -08:00
Matt Ranney
79511b4499 Fix parser bug after failed EXEC. 2010-11-30 11:47:52 -08:00
Paul Carey
5bddbe3d9a Partial fix for null multi bulk response. 2010-11-10 10:04:47 -08:00
Matt Ranney
1eb3f6a1aa Add "drain" and "idle" events. 2010-11-09 13:13:40 -08:00
Matt Ranney
e6f7dc5f20 Check for stream.writable before trying to write() 2010-11-09 12:14:22 -08:00
Matt Ranney
f91626d110 Send friendlier error event on stream errors. 2010-11-03 12:43:18 -07:00
Matt Ranney
a3c03dcc68 Add all commands from Redis master, not just ones documented on the Redis wiki.
Use lowercase for all command names.
Build RedisClient and Multi prototype at the same time.
2010-10-30 01:40:31 -07:00
Matt Ranney
7a9ae90fcf sys -> util
Also, only emit "end" once, which was confusing the tests.
2010-10-21 18:13:58 -07:00
Matt Ranney
645a981231 JSLint fixes. 2010-10-20 16:38:47 -07:00
Matt Ranney
85bd648adc Export RedisClient prototype to support extending.
See examples/extend.js for a simple example.
Remove command list from exports while I was in there.
2010-10-05 11:30:57 -07:00
Aivo Paas
3495b60047 Fixed .multi() to convert HGETALL result to an object 2010-10-02 22:00:57 +03:00
Matt Ranney
8356ecfda8 Simplify lowercase command prototype.
Suggested by Rasmus Andersson
2010-09-30 09:15:19 -07:00
Matt Ranney
8ec36ae383 Merge remote branch 'Tim_Smart/performance' 2010-09-29 21:32:07 -07:00
Matt Ranney
c970b12c25 Reset all parser state on error. 2010-09-29 21:31:36 -07:00
Tim-Smart
4d70a8de4b Loop optimizations 2010-09-30 17:18:53 +13:00
Orion Henry
5321a1746f have the parser try to recover from errors when it has them and communicate this back to the user 2010-09-29 17:10:01 -07:00
Orion Henry
98e27c43dd reset subscriptions when the connection is broken 2010-09-27 17:23:23 -07:00
Orion Henry
dcbb87dff7 fix bug not allowing you to quit while in subscribe mode - added test 2010-09-27 17:11:12 -07:00
Orion Henry
71763dcd66 Send the number of bytes, not characters. Fixes unrecoverable bug if multibyte characters are used. 2010-09-27 08:26:59 -07:00
Tim-Smart
a664565922 Allow array args in multi as before 2010-09-24 18:33:38 -07:00
Matt Ranney
155d321544 All Multi objects to be re-used. 2010-09-24 14:03:36 -07:00
Matt Ranney
d19e893f28 Support new and imrpoved MULTI syntax. 2010-09-24 13:16:02 -07:00
Matt Ranney
29f10cd593 Merge remote branch 'tj/features/multi'
Conflicts:
	test.js
2010-09-24 10:51:21 -07:00
Matt Ranney
9e65e6a6a8 Improve retry logic. 2010-09-23 16:58:19 -07:00
Matt Ranney
6e64d81800 Fix parsing mb nil in nested multi-bulk reply. 2010-09-23 12:21:52 -07:00
Tj Holowaychuk
91ebe64dae Implemented alternate MULTI syntax
Usage:

  client
    .multi
    .set(foo, bar)
    .set(counter, 1)
    .incr(counter)
    .exec(function(err, replies){});
2010-09-22 18:38:55 -07:00
Matt Ranney
76ecd927cd Support for nested multi-bulk replies. 2010-09-22 17:35:26 -07:00
Orion Henry
6c36ed09c0 createClient was ignoring the host arg 2010-09-22 13:16:33 -07:00
Matt Ranney
0aa7676eab Fix style and global leaks found with JSLint. 2010-09-22 11:36:31 -07:00
rick
05446cd056 console.log typo 2010-09-20 12:33:05 -07:00
rick
0b51924aa7 ensure client emits connect and end events 2010-09-20 12:29:35 -07:00