node-redis

Redis Node.js client

MIT License

Downloads
71.5M
Stars
16.9K
Committers
247

Bot releases are visible (Hide)

node-redis -

Published by BridgeAR almost 8 years ago

Bugfixes

  • Fixed parser not being reset in case the redis connection closed ASAP for overcoming of output buffer limits
  • Fixed parser reset if (p)message_buffer listener is attached
node-redis -

Published by BridgeAR almost 8 years ago

Bugfixes

  • Fixed monitor mode not working in combination with IPv6, sockets or lua scripts (2.6.0 regression)
node-redis -

Published by BridgeAR almost 8 years ago

Bugfixes

  • Do not change the tls setting to camel_case
  • Fix domain handling in combination with the offline queue (2.5.3 regression)
node-redis -

Published by BridgeAR over 8 years ago

Bugfixes

  • Fixed individual callbacks of a transaction not being called (2.6.0 regression)
node-redis -

Published by BridgeAR over 8 years ago

Bugfixes

  • Fixed invalid function name being exported
node-redis -

Published by BridgeAR over 8 years ago

We proudly present:

Fixed pub sub, better error handling, camelCase and big number support, improved performance, fire and forget commands, bug fixes and more.

This is the combined changelog of all pre-releases of the 2.6 release plus the additional changes. If you want to see the individual changelogs, please have a look.

Features

  • Added name property to all Redis functions (Node.js >= 4.0)
  • Added support for the new CLIENT REPLY ON|OFF|SKIP command (Redis v.3.2)
  • Added support for camelCase
  • The Node.js landscape default is to use camelCase. node_redis is a bit out of the box here
    but from now on it is possible to use both, just as you prefer!
  • If there's any documented variable missing as camelCased, please open a issue for it
  • Improve error handling significantly
  • Improved stack traces in development and debug mode
  • Only emit an error if the error has not already been handled in a callback
  • Improved unspecific error messages e.g. "Connection gone from end / close event"
  • Added args to command errors to improve identification of the error
  • Added origin to errors if there's e.g. a connection error
  • Added ReplyError class. All Redis errors are from now on going to be of that class
  • Added AbortError class. A subclass of AbortError. All unresolved and by node_redis rejected commands are from now on of that class
  • Added AggregateError class. If a unresolved and by node_redis rejected command has no callback and
    this applies to more than a single command, the errors for the commands without callback are aggregated
    to a single error that is emitted in debug_mode in that case.
  • Added message_buffer / pmessage_buffer events. That event is always going to emit a buffer
  • Listening to the message event at the same time is always going to return the same message as string
  • Added callback option to the duplicate function
  • Monitor and pub sub mode now work together with the offline queue
  • All commands that were send after a connection loss are now going to be send after reconnecting
  • Activating monitor mode does now work together with arbitrary commands including pub sub mode
  • Pub sub mode is completly rewritten and all known issues fixed
  • Added string_numbers option to get back strings instead of numbers
  • Quit command is from now on always going to end the connection properly
  • Added type validations for client.send_command arguments
  • Updated redis-parser dependency (changelog)
  • The JS parser is from now on the new default as it is a lot faster than the hiredis parser
  • This is no BC as there is no changed behavior for the user at all but just a performance improvement. Explicitly requireing the Hiredis parser is still possible.
  • Updated redis-commands dependency (changelog)

Bugfixes

  • Fixed v.2.5.0 auth command regression (under special circumstances a reconnect would not authenticate properly)
  • Fixed special handled functions in batch and multi context not working the same as without (e.g. select and info)
  • Be aware that not all commands work in combination with transactions but they all work with batch
  • Fixed address always set to 127.0.0.1:6379 in case host / port is set in the tls options instead of the general options
  • Fixed client.send_command not working properly with every command and every option
  • Fixed pub sub mode unsubscribing from all channels not respected while reconnecting
  • Fixed pub sub mode events in combination with the string_numbers option emitting the number of channels not as number
  • Fixed calling monitor command while other commands are still running
  • Fixed monitor and pub sub mode not working together
  • Fixed monitor mode not working in combination with the offline queue
  • Fixed pub sub mode not working in combination with the offline queue
  • Fixed pub sub mode resubscribing not working with non utf8 buffer channels
  • Fixed pub sub mode crashing if calling unsubscribe / subscribe in various combinations
  • Fixed pub sub mode emitting unsubscribe even if no channels were unsubscribed
  • Fixed pub sub mode emitting a message without a message published
  • Fixed quit command not ending the connection and resulting in further reconnection if called while reconnecting

The quit command did not end connections earlier if the connection was down at that time and this could have
lead to strange situations, therefor this was fixed to end the connection right away in those cases.

Deprecations

  • The parser option is deprecated and should be removed. The built-in Javascript parser is a lot faster than the hiredis parser and has more features
node-redis -

Published by BridgeAR over 8 years ago

Features

  • Added support for the new CLIENT REPLY ON|OFF|SKIP command (Redis v.3.2)
  • Added support for camelCase
  • The Node.js landscape default is to use camelCase. node_redis is a bit out of the box here
    but from now on it is possible to use both, just as you prefer!
  • If there's any documented variable missing as camelCased, please open a issue for it
  • Improve error handling significantly
  • Only emit an error if the error has not already been handled in a callback
  • Emit an error in debug_mode if a command would otherwise silently fail (no callback present)
  • Improved unspecific error messages e.g. "Connection gone from end / close event"
  • Added args to command errors to improve identification of the error
  • Added origin to errors if there's e.g. a connection error
  • Added ReplyError class. All Redis errors are from now on going to be of that class
  • Added AbortError class. A subclass of AbortError. All unresolved and by node_redis rejected commands are from now on of that class
  • Added AggregateError class. If a unresolved and by node_redis rejected command has no callback and
    this applies to more than a single command, the errors for the commands without callback are aggregated
    to a single error that is emitted in debug_mode in that case.
  • Added message_buffer / pmessage_buffer events. That event is always going to emit a buffer
  • Listening to the message event at the same time is always going to return the same message as string
  • Added callback option to the duplicate function
  • Added support for __proto__ and other reserved keywords as hgetall field
  • Updated redis-commands dependency (changelog)

Bugfixes

  • Fixed v.2.5.0 auth command regression (under special circumstances a reconnect would not authenticate properly)
  • Fixed v.2.6.0-0 pub sub mode and quit command regressions:
  • Entering pub sub mode not working if a earlier called and still running command returned an error
  • Unsubscribe callback not called if unsubscribing from all channels and resubscribing right away
  • Quit command resulting in an error in some cases
  • Fixed special handled functions in batch and multi context not working the same as without (e.g. select and info)
  • Be aware that not all commands work in combination with transactions but they all work with batch
  • Fixed address always set to 127.0.0.1:6379 in case host / port is set in the tls options instead of the general options
node-redis -

Published by BridgeAR over 8 years ago

A second pre-release with further fixes. This is likely going to be released as 2.6.0 stable without further changes.

Features

  • Added type validations for client.send_command arguments

Bugfixes

  • Fixed client.send_command not working properly with every command and every option
  • Fixed pub sub mode unsubscribing from all channels in combination with the new string_numbers option crashing
  • Fixed pub sub mode unsubscribing from all channels not respected while reconnecting
  • Fixed pub sub mode events in combination with the string_numbers option emitting the number of channels not as number
node-redis - Rock solid pub sub and monitor

Published by BridgeAR over 8 years ago

This is mainly a very important bug fix release with some smaller features.
The quit command did not end connections earlier if the connection was down at that time and this could have lead to strange situations, therefor this was fixed to end the connection right away in those cases.

Features

  • Monitor and pub sub mode now work together with the offline queue
  • All commands that were send after a connection loss are now going to be send after reconnecting
  • Activating monitor mode does now work together with arbitrary commands including pub sub mode
  • Pub sub mode is completly rewritten and all known issues fixed
  • Added string_numbers option to get back strings instead of numbers
  • Quit command is from now on always going to end the connection properly

Bugfixes

  • Fixed calling monitor command while other commands are still running
  • Fixed monitor and pub sub mode not working together
  • Fixed monitor mode not working in combination with the offline queue
  • Fixed pub sub mode not working in combination with the offline queue
  • Fixed pub sub mode resubscribing not working with non utf8 buffer channels
  • Fixed pub sub mode crashing if calling unsubscribe / subscribe in various combinations
  • Fixed pub sub mode emitting unsubscribe even if no channels were unsubscribed
  • Fixed pub sub mode emitting a message without a message published
  • Fixed quit command not ending the connection and resulting in further reconnection if called while reconnecting
node-redis -

Published by BridgeAR over 8 years ago

Bugfixes

  • Revert throwing on invalid data types and print a warning instead
node-redis -

Published by BridgeAR over 8 years ago

Bugfixes

  • Fixed breaking changes against Redis 2.4 introduced in 2.5.0 / 2.5.1
node-redis -

Published by BridgeAR over 8 years ago

Bugfixes

  • Fixed info command not working anymore with optional section argument in 2.5.0
node-redis -

Published by BridgeAR over 8 years ago

Please check the changelog of the pre-release.

node-redis - 2.5.0 Pre-release

Published by BridgeAR over 8 years ago

This is a big release with some substaintual underlining changes. Therefor this is released as a pre-release and I encourage anyone who's able to, to test this out. Likely nothing will change until 2.5.0.

It took way to long to release this one and the next release cycles will be shorter again.

This release is also going to deprecate a couple things to prepare for a future v.3 (it'll still take a while to v.3).

Features

  • The parsers moved into the redis-parser module and will be maintained in there from now on
  • Improve js parser speed significantly for big SUNION/SINTER/LRANGE/ZRANGE
  • Improve redis-url parsing to also accept the database-number and options as query parameters as suggested in IANA
  • Added a retry_unfulfilled_commands option
  • Setting this to 'true' results in retrying all commands that were not fulfilled on a connection loss after the reconnect. Use with caution
  • Added a db option to select the database while connecting (this is not recommended)
  • Added a password option as alias for auth_pass
  • The client.server_info is from now on updated while using the info command
  • Gracefuly handle redis protocol errors from now on
  • Added a warning emitter that receives node_redis warnings like auth not required and deprecation messages
  • Added a retry_strategy option that replaces all reconnect options
  • The reconnecting event from now on also receives:
  • The error message why the reconnect happend (params.error)
  • The amount of times the client was connected (params.times_connected)
  • The total reconnecting time since the last time connected (params.total_retry_time)
  • Always respect the command execution order no matter if the reply could be returned sync or not (former exceptions: #937)
  • redis.createClient is now checking input values stricter and detects more faulty input
  • Started refactoring internals into individual modules
  • Pipelining speed improvements

Bugfixes

  • Fixed explicit undefined as a command callback in a multi context
  • Fixed hmset failing to detect the first key as buffer or date if the key is of that type
  • Fixed do not run toString on an array argument and throw a "invalid data" error instead
  • This is not considered as breaking change, as this is likely a error in your code and if you want to have such a behavior you should handle this beforehand
  • The same applies to Map / Set and individual Object types
  • Fixed redis url not accepting the protocol being omitted or protocols other than the redis protocol for convienence
  • Fixed parsing the db keyspace even if the first database does not begin with a zero
  • Fixed handling of errors occuring while receiving pub sub messages
  • Fixed huge string pipelines crashing NodeJS (Pipeline size above 256mb)
  • Fixed rename_commands and prefix option not working together
  • Fixed ready being emitted to early in case a slave is still syncing / master down

Deprecations

  • Using any command with a argument being set to null or undefined is deprecated
  • From v.3.0.0 on using a command with such an argument will return an error instead
  • If you want to keep the old behavior please use a precheck in your code that converts the arguments to a string.
  • Using SET or SETEX with a undefined or null value will from now on also result in converting the value to "null" / "undefined" to have a consistent behavior. This is not considered as breaking change, as it returned an error earlier.
  • Using .end(flush) without the flush parameter is deprecated and the flush parameter should explicitly be used
  • From v.3.0.0 on using .end without flush will result in an error
  • Using .end without flush means that any command that did not yet return is going to silently fail. Therefor this is considered harmfull and you should explicitly silence such errors if you are sure you want this
  • Depending on the return value of a command to detect the backpressure is deprecated
  • From version 3.0.0 on node_redis might not return true / false as a return value anymore. Please rely on client.should_buffer instead
  • The socket_nodelay option is deprecated and will be removed in v.3.0.0
  • If you want to buffer commands you should use .batch or .multi instead. This is necessary to reduce the amount of different options and this is very likely reducing your throughput if set to false.
  • If you are sure you want to activate the NAGLE algorithm you can still activate it by using client.stream.setNoDelay(false)
  • The max_attempts option is deprecated and will be removed in v.3.0.0. Please use the retry_strategy instead
  • The retry_max_delay option is deprecated and will be removed in v.3.0.0. Please use the retry_strategy instead
  • The drain event is deprecated and will be removed in v.3.0.0. Please listen to the stream drain event instead
  • The idle event is deprecated and will likely be removed in v.3.0.0. If you rely on this feature please open a new ticket in node_redis with your use case
  • Redis < v. 2.6.11 is not supported anymore and will not work in all cases. Please update to a newer redis version
  • Removed non documented command syntax (adding the callback to an arguments array instead of passing it as individual argument)
node-redis -

Published by BridgeAR almost 9 years ago

Bugfixes

  • Fixed not emitting ready after reconnect with disable_resubscribing (@maxgalbu)
node-redis -

Published by BridgeAR almost 9 years ago

Bugfixes

  • Fixed a js parser regression introduced in 2.4.0 (@BridgeAR)
node-redis - TLS & key prefixing

Published by BridgeAR almost 9 years ago

Features

  • Added tls option to iniate a connection to a redis server behind a TLS proxy. Thanks (@paddybyers)
  • Added prefix option to auto key prefix any command with the provided prefix (@luin & @BridgeAR)
  • Added url option to pass the connection url with the options object (@BridgeAR)
  • Added client.duplicate([options]) to duplicate the current client and return a new one with the same options (@BridgeAR)
  • Improve performance by up to 20% on almost all use cases (@BridgeAR)

Bugfixes

  • Fixed js parser handling big values slow (@BridgeAR)
  • The speed is now on par with the hiredis parser.
node-redis - Big data with the JS parser

Published by BridgeAR almost 9 years ago

Bugfixes

  • Fixed saving buffers with charsets other than utf-8 while using multi (@BridgeAR)
  • Fixed js parser handling big values very slow (@BridgeAR)
  • The speed is up to ~500% faster than before but still up to ~50% slower than the hiredis parser.
node-redis -

Published by BridgeAR almost 9 years ago

v.2.3.0 - 30 Oct, 2015

Features

  • Improve speed further for: (@BridgeAR)
  • saving big strings (up to +300%)
  • using .multi / .batch (up to +50% / on Node.js 0.10.x +300%)
  • saving small buffers
  • Increased coverage to 99% (@BridgeAR)
  • Refactored manual backpressure control (@BridgeAR)
  • Removed the high water mark and low water mark. Such a mechanism should be implemented by a user instead
  • The drain event is from now on only emitted if the stream really had to buffer
  • Reduced the default connect_timeout to be one hour instead of 24h (@BridgeAR)
  • Added .path to redis.createClient(options); (@BridgeAR)
  • Ignore info command, if not available on server (@ivanB1975)

Bugfixes

  • Fixed a js parser error that could result in a timeout (@BridgeAR)
  • Fixed .multi / .batch used with Node.js 0.10.x not working properly after a reconnect (@BridgeAR)
  • Fixed fired but not yet returned commands not being rejected after a connection loss (@BridgeAR)
  • Fixed connect_timeout not respected if no connection has ever been established (@gagle & @benjie)
  • Fixed return_buffers in pub sub mode (@komachi)
node-redis -

Published by BridgeAR about 9 years ago

Bugfixes

  • Fixed undefined options passed to a new instance not accepted (possible with individual .createClient functions like in fakeredis) (@BridgeAR)