Skip to content

Releases: redis/node-redis

v.2.2.2

13 Oct 23:14
Compare
Choose a tag to compare

Bugfixes

  • Fix regular commands not being executed after a .multi until .exec was called (@BridgeAR)

The peregrino falcon

12 Oct 15:54
Compare
Choose a tag to compare

The peregrino falcon is the fasted bird on earth and this is what this release is all about: Increased performance for heavy usage by up to 400% [sic!] and increased overall performance for any command as well. Please check the benchmarks in the README.md for further details.

Features

  • Added rename_commands options to handle renamed commands from the redis config (@digmxl & @BridgeAR)
  • Added disable_resubscribing option to prevent a client from resubscribing after reconnecting (@BridgeAR)
  • Increased performance (@BridgeAR)
  • exchanging built in queue with @petkaantonov's double-ended queue
  • prevent polymorphism
  • optimize statements
  • Added .batch command, similar to .multi but without transaction (@BridgeAR)
  • Improved pipelining to minimize the RTT further (@BridgeAR)

Bugfixes

  • Fix a javascript parser regression introduced in 2.0 that could result in timeouts on high load. (@BridgeAR)
  • I was not able to write a regression test for this, since the error seems to only occur under heavy load with special conditions. So please have a look for timeouts with the js parser, if you use it and report all issues and switch to the hiredis parser in the meanwhile. If you're able to come up with a reproducable test case, this would be even better :)
  • Fixed should_buffer boolean for .exec, .select and .auth commands not being returned and fix a couple special conditions (@BridgeAR)

If you do not rely on transactions but want to reduce the RTT you can use .batch from now on. It'll behave just the same as .multi but it does not have any transaction and therefor won't roll back any failed commands.

Both .multi and .batch are from now on going to cache the commands and release them while calling .exec.

Please consider using .batch instead of looping through a lot of commands one by one. This will significantly improve your performance.

Here are some stats compared to ioredis 1.9.1 (Lenovo T450s i7-5600U):

                  simple set
      82,496 op/s » ioredis
     112,617 op/s » node_redis

                  simple get
      82,015 op/s » ioredis
     105,701 op/s » node_redis

                  simple get with pipeline
      10,233 op/s » ioredis
      26,541 op/s » node_redis (using .batch)

                  lrange 100
       7,321 op/s » ioredis
      26,155 op/s » node_redis

                  publish
      90,524 op/s » ioredis
     112,823 op/s » node_redis

                  subscribe
      43,783 op/s » ioredis
      61,889 op/s » node_redis

To conclude: we can proudly say that node_redis is very likely outperforming any other node redis client.

Known issues

  • The pub sub system has some flaws and those will be addressed in the next minor release

v.2.1.0

02 Oct 19:15
Compare
Choose a tag to compare

Features:

  • Addded optional flush parameter to .end. If set to true, commands fired after using .end are going to be rejected instead of being ignored. (@crispy1989)
  • Addded: host and port can now be provided in a single options object. E.g. redis.createClient({ host: 'localhost', port: 1337, max_attempts: 5 }); (@BridgeAR)
  • Speedup common cases (@BridgeAR)

Bugfixes:

  • Fix argument mutation while using the array notation with the multi constructor (@BridgeAR)
  • Fix multi.hmset key not being type converted if used with an object and key not being a string (@BridgeAR)
  • Fix parser errors not being catched properly (@BridgeAR)
  • Fix a crash that could occur if a redis server does return the info command as usual #541 (@BridgeAR)
  • Explicitly passing undefined as a callback statement will work again. E.g. client.publish('channel', 'message', undefined); (@BridgeAR)

Don't mutate arguments passed as array

23 Sep 22:56
Compare
Choose a tag to compare

#866 Fix argument mutation while using the array notation in combination with keys / callbacks (@BridgeAR)

Major overhaul

21 Sep 20:13
Compare
Choose a tag to compare

v2.0.0 - Sep 21, 2015

This is the biggest release that node_redis had since it was released in 2010. A long list of outstanding bugs has been fixed, so we are very happy to present you redis 2.0 and we highly recommend updating as soon as possible.

What's new in 2.0

  • Implemented a "connection is broken" mode if no connection could be established
  • node_redis no longer throws under any circumstances, preventing it from terminating applications.
  • Multi error handling is now working properly
  • Consistent command behavior including multi
  • Windows support
  • Improved performance
  • A lot of code cleanup
  • Many bug fixes
  • Better user support!

Features:

  • Added a "redis connection is broken" mode after reaching max connection attempts / exceeding connection timeout. (@BridgeAR)
  • Added NODE_DEBUG=redis env to activate the debug_mode (@BridgeAR)
  • Added a default connection timeout of 24h instead of never timing out as a default (@BridgeAR)
  • Added: Network errors and other stream errors will from now on include the error code as err.code property (@BridgeAR)
  • Added: Errors thrown by redis will now include the redis error code as err.code property. (@skeggse & @BridgeAR)
  • Added: Errors thrown by node_redis will now include a err.command property for the command used (@BridgeAR)
  • Added new commands and drop support for deprecated substr (@BridgeAR)
  • Added new possibilities how to provide the command arguments (@BridgeAR)
  • The entries in the keyspace of the server_info is now an object instead of a string. (@SinisterLight & @BridgeAR)
  • Small speedup here and there (e.g. by not using .toLowerCase() anymore) (@BridgeAR)
  • Full windows support (@bcoe)
  • Increased coverage by 10% and add a lot of tests to make sure everything works as it should. We now reached 97% :-) (@BridgeAR)
  • Remove dead code, clean up and refactor very old chunks (@BridgeAR)
  • Don't flush the offline queue if reconnecting (@BridgeAR)
  • Emit all errors insteaf of throwing sometimes and sometimes emitting them (@BridgeAR)
  • auth_pass passwords are now checked to be a valid password (@jcppman & @BridgeAR)

Bug fixes:

  • Don't kill the app anymore by randomly throwing errors sync instead of emitting them (@BridgeAR)
  • Don't catch user errors anymore occuring in callbacks (no try callback anymore & more fixes for the parser) (@BridgeAR)
  • Early garbage collection of queued items (@dohse)
  • Fix js parser returning errors as strings (@BridgeAR)
  • Do not wrap errors into other errors (@BridgeAR)
  • Authentication failures are now returned in the callback instead of being emitted (@BridgeAR)
  • Fix a memory leak on reconnect (@rahar)
  • Using send_command directly may no also be called without the args as stated in the README.md (@BridgeAR)
  • Fix the multi.exec error handling (@BridgeAR)
  • Fix commands being inconsistent and behaving wrong (@BridgeAR)
  • Channel names with spaces are now properly resubscribed after a reconnection (@pbihler)
  • Do not try to reconnect after the connection timeout has been exceeded (@BridgeAR)
  • Removed bad .eval implementation (@BridgeAR)
  • Fix commands not being rejected after calling .quit (@BridgeAR)
  • Fix .auth calling the callback twice if already connected (@BridgeAR)
  • Fix detect_buffers not working in pub sub mode and while monitoring (@BridgeAR)
  • Fix channel names always being strings instead of buffers while return_buffers is true (@BridgeAR)
  • Don't print any debug statements if not asked for (@BridgeAR)
  • Fix a couple small other bugs

Breaking changes:

  1. redis.send_command commands have to be lower case from now on. This does only apply if you use .send_command directly instead of the convenient methods like redis.command.
  2. Error messages have changed quite a bit. If you depend on a specific wording please check your application carfully.
  3. Errors are from now on always either returned if a callback is present or emitted. They won't be thrown (neither sync, nor async).
  4. The Multi error handling has changed a lot!
    • All errors are from now on errors instead of strings (this only applied to the js parser).
    • If an error occurs while queueing the commands an EXECABORT error will be returned including the failed commands as .errors property instead of an array with errors.
    • If an error occurs while executing the commands and that command has a callback it'll return the error as first parameter (err, undefined instead of null, undefined).
    • All the errors occuring while executing the commands will stay in the result value as error instance (if you used the js parser before they would have been strings). Be aware that the transaction won't be aborted if those error occurr!
    • If multi.exec does not have a callback and an EXECABORT error occurrs, it'll emit that error instead.
  5. If redis can't connect to your redis server it'll give up after a certain point of failures (either max connection attempts or connection timeout exceeded). If that is the case it'll emit an CONNECTION_BROKEN error. You'll have to initiate a new client to try again afterwards.
  6. The offline queue is not flushed anymore on a reconnect. It'll stay until node_redis gives up trying to reach the server or until you close the connection.
  7. Before this release node_redis catched user errors and threw them async back. This is not the case anymore! No user behavior of what so ever will be tracked or catched.
  8. The keyspace of redis.server_info (db0...) is from now on an object instead of an string.

NodeRedis also thanks @qdb, @tobek, @cvibhagool, @frewsxcv, @davidbanham, @serv, @vitaliylag, @chrishamant, @GamingCoder and all other contributors that I may have missed for their contributions!

From now on we'll push new releases more frequently out and fix further long outstanding things and implement new features.

URL connection strings

30 Aug 20:02
Compare
Choose a tag to compare