1
0
mirror of https://github.com/redis/node-redis.git synced 2025-12-09 21:21:11 +03:00
Commit Graph

2230 Commits

Author SHA1 Message Date
GitHub Action
ceeca035d0 Release bloom@5.9.0-beta.0 bloom@5.9.0-beta.0 2025-09-10 09:04:24 +00:00
GitHub Action
550767e3ae Release client@5.9.0-beta.0 client@5.9.0-beta.0 2025-09-10 09:04:19 +00:00
Nikolay Karadzhov
208a0d250f Hitless upgrades (#3021)
* feat(errors): Add specialized timeout error types for maintenance scenarios

- Added `SocketTimeoutDuringMaintananceError`, a subclass of `TimeoutError`, to handle socket timeouts during maintenance.
- Added `CommandTimeoutDuringMaintenanceError`, another subclass of `TimeoutError`, to address command write timeouts during maintenance.

* feat(linked-list): Add EmptyAwareSinglyLinkedList and enhance DoublyLinkedList functionality

- Introduced `EmptyAwareSinglyLinkedList`, a subclass of `SinglyLinkedList` that emits an `empty` event when the list becomes empty due to `reset`, `shift`, or `remove` operations.
- Added `nodes()` iterator method to `DoublyLinkedList` for iterating over nodes directly.
- Enhanced unit tests for `DoublyLinkedList` and `SinglyLinkedList` to cover edge cases and new functionality.
- Added comprehensive tests for `EmptyAwareSinglyLinkedList` to validate `empty` event emission under various scenarios.
- Improved code formatting and consistency.

* refactor(commands-queue): Improve push notification handling

- Replaced `setInvalidateCallback` with a more flexible `addPushHandler` method, allowing multiple handlers for push notifications.
- Introduced the `PushHandler` type to standardize push notification processing.
- Refactored `RedisCommandsQueue` to use a `#pushHandlers` array, enabling dynamic and modular handling of push notifications.
- Updated `RedisClient` to leverage the new handler mechanism for `invalidate` push notifications, simplifying and decoupling logic.

* feat(commands-queue): Add method to wait for in-flight commands to complete

- Introduced `waitForInflightCommandsToComplete` method to asynchronously wait for all in-flight commands to finish processing.
- Utilized the `empty` event from `#waitingForReply` to signal when all commands have been completed.

* feat(commands-queue): Introduce maintenance mode support for commands-queue

- Added `#maintenanceCommandTimeout` and `setMaintenanceCommandTimeout` method to dynamically adjust command timeouts during maintenance

* refator(client): Extract socket event listener setup into helper method

* refactor(socket): Add maintenance mode support and dynamic timeout handling

- Added `#maintenanceTimeout` and `setMaintenanceTimeout` method to dynamically adjust socket timeouts during maintenance.

* feat(client): Add Redis Enterprise maintenance configuration options

- Added `maintPushNotifications` option to control how the client handles Redis Enterprise maintenance push notifications (`disabled`, `enabled`, `au
to`).
- Added `maintMovingEndpointType` option to specify the endpoint type for reconnecting during a MOVING notification (`auto`, `internal-ip`, `external-ip`,
etc.).
- Added `maintRelaxedCommandTimeout` option to define a relaxed timeout for commands during maintenance.
- Added `maintRelaxedSocketTimeout` option to define a relaxed timeout for the socket during maintenance.
- Enforced RESP3 requirement for maintenance-related features (`maintPushNotifications`).

* feat(client): Add socket helpers and pause mechanism

- Introduced `#paused` flag with corresponding `_pause` and `_unpause` methods to
temporarily halt writing commands to the socket during maintenance windows.
- Updated `#write` method to respect the `#paused` flag, preventing new commands from being written during maintenance.
- Added `_ejectSocket` method to safely detach from and return the current socket
- Added `_insertSocket` method to receive and start using a new socket

* feat(client): Add Redis Enterprise maintenance handling capabilities

- Introduced `EnterpriseMaintenanceManager` to manage Redis Enterprise maintenance events and push notifications.
- Integrated `EnterpriseMaintenanceManager` into `RedisClient` to handle maintenance push notifications and manage socket transitions.
- Implemented graceful handling of MOVING, MIGRATING, and FAILOVER push notifications, including socket replacement and timeout adjustments.


* test: add E2E test infrastructure for Redis maintenance scenarios

* test: add E2E tests for Redis Enterprise maintenance timeout handling (#3)

* test: add connection handoff test


---------

Co-authored-by: Pavel Pashov <pavel.pashov@redis.com>
Co-authored-by: Pavel Pashov <60297174+PavelPashov@users.noreply.github.com>
2025-09-10 11:05:37 +03:00
Nikolay Karadzhov
6ad4c68655 docs: fix scanIterator example in readme (#3072)
fixes: #3071
2025-09-01 12:07:40 +03:00
blackman
1d824df9e1 feat: add LATENCY_RESET command (#3047) 2025-08-27 18:10:15 +03:00
Nikolay Karadzhov
672246dbd2 fix(ts): use all commands in cluster type (#3065)
RedisClusterType was using some type restrictions to
hide some commands based on its properties. In reality,
all commands should be exposed to user ( as in v4 ).

fixes #3064
2025-08-26 16:35:45 +03:00
GitHub Action
7b56e9a3dc Release redis@5.8.2 redis@5.8.2 2025-08-20 08:33:41 +00:00
GitHub Action
3d6eefc246 Release entraid@5.8.2 entraid@5.8.2 2025-08-20 08:33:35 +00:00
GitHub Action
01157a0147 Release time-series@5.8.2 time-series@5.8.2 2025-08-20 08:33:29 +00:00
GitHub Action
c73a8c6569 Release search@5.8.2 search@5.8.2 2025-08-20 08:33:23 +00:00
GitHub Action
5e575b9550 Release json@5.8.2 json@5.8.2 2025-08-20 08:33:16 +00:00
GitHub Action
0a5d076cf5 Release bloom@5.8.2 bloom@5.8.2 2025-08-20 08:33:10 +00:00
GitHub Action
2e66012099 Release client@5.8.2 client@5.8.2 2025-08-20 08:33:04 +00:00
Nikolay Karadzhov
b9a5d36640 fix(search): properly decide if response has docs (#3060)
fixes: #3056
2025-08-20 11:12:25 +03:00
Nikolay Karadzhov
e347d566cb fix(sentinel): properly pass reconnectStrategy (#3063)
Properly pass reconnectStrategy to master/replica nodes.
Before that strategies passed in the nodeClientOptions.socket
object were ignored.

fixes #3061
2025-08-20 11:11:34 +03:00
Nikolay Karadzhov
d5423b93d6 chore(tests): bump test container version 8.2.1-pre (#3057) 2025-08-18 11:32:41 +03:00
Manuel Spigolon
ed6aca7d03 fix(ts): xtrim threshold accepts string (#3058)
* fix(ts): xtrim threshold accepts string

* test: check MINID with text id
2025-08-18 11:22:44 +03:00
Nathan Friedly
fceb60968e docs: Call out sendCommand cluster difference in readme (#3054)
A followup to https://github.com/redis/node-redis/pull/3053
2025-08-14 10:49:05 +03:00
Arek W
82847fb92c fix: Stop erasing ErrorReply stack (#3050)
It was very difficult to debug `ErrorReply` errors due to `error.stack` being erased.
Given this restores standard JS Error behaviour, I have not added any tests.
2025-08-14 10:42:36 +03:00
Nathan Friedly
746e9b184b docs: Clustering sendCommand docs (#3053)
We noticed that `sendCommand()` takes different arguments for clusters vs clients, and I wanted to document the differences. I think I got it correct, but please review closely just to be sure.
2025-08-13 22:26:14 +03:00
GitHub Action
cafdc63459 Release redis@5.8.1 redis@5.8.1 2025-08-13 06:22:51 +00:00
GitHub Action
4e5e31dc55 Release entraid@5.8.1 entraid@5.8.1 2025-08-13 06:22:45 +00:00
GitHub Action
c0e6c78873 Release time-series@5.8.1 time-series@5.8.1 2025-08-13 06:22:39 +00:00
GitHub Action
603fa71fe1 Release search@5.8.1 search@5.8.1 2025-08-13 06:22:33 +00:00
GitHub Action
80c3dd3dc2 Release json@5.8.1 json@5.8.1 2025-08-13 06:22:27 +00:00
GitHub Action
4900d2b2ad Release bloom@5.8.1 bloom@5.8.1 2025-08-13 06:22:21 +00:00
GitHub Action
883375cf4d Release client@5.8.1 client@5.8.1 2025-08-13 06:22:15 +00:00
Pavel Pashov
68cebf7f6e fix: parse database from Redis URL (#3052) 2025-08-13 08:51:30 +03:00
Nikolay Karadzhov
2f10632450 fix(commands): expire, expireAt are not readonly (#3045)
fixes #3044
2025-08-06 09:50:19 +03:00
Nikolay Karadzhov
6406172ea8 chore(tests): bump test container version 8.2 (#3046) 2025-08-06 09:49:52 +03:00
GitHub Action
12f7d8a7fe Release redis@5.8.0 redis@5.8.0 2025-08-05 09:58:40 +00:00
GitHub Action
0916d33b12 Release entraid@5.8.0 entraid@5.8.0 2025-08-05 09:58:32 +00:00
GitHub Action
4b6a3d1c39 Release time-series@5.8.0 time-series@5.8.0 2025-08-05 09:58:25 +00:00
GitHub Action
1436a6e304 Release search@5.8.0 search@5.8.0 2025-08-05 09:58:17 +00:00
GitHub Action
cf16f8b790 Release json@5.8.0 json@5.8.0 2025-08-05 09:58:10 +00:00
GitHub Action
42ec771151 Release bloom@5.8.0 bloom@5.8.0 2025-08-05 09:58:03 +00:00
GitHub Action
de5e916e05 Release client@5.8.0 client@5.8.0 2025-08-05 09:57:55 +00:00
Igor Loskutov
0f709d01c5 fix: createClient url+tls invariant violation check (#2835) 2025-08-05 10:12:10 +03:00
Pavel Pashov
66638fc903 Add support svs vamana index creation (#3025)
* feat(search): add SVS-VAMANA vector index algorithm support

- Add VAMANA algorithm with compression and tuning parameters
- Include comprehensive test coverage for various configurations
- Fix parameter validation to handle falsy values correctly

* feat(search): add additional VAMANA compression algorithms

- Add LVQ4, LVQ4x4, LVQ4x8, LeanVec4x8, and LeanVec8x8 compression options
- Update test to use LeanVec4x8 compression algorithm

* chore: update Redis version from 8.2-rc1 to 8.2-rc2-pre
2025-08-04 12:07:18 +03:00
GitHub Action
e2d4b43e39 Release redis@5.7.0 redis@5.7.0 2025-07-31 13:39:49 +00:00
GitHub Action
c75809ec65 Release entraid@5.7.0 entraid@5.7.0 2025-07-31 13:39:41 +00:00
GitHub Action
fa3ca983a3 Release time-series@5.7.0 time-series@5.7.0 2025-07-31 13:39:34 +00:00
GitHub Action
f37f98aced Release search@5.7.0 search@5.7.0 2025-07-31 13:39:26 +00:00
GitHub Action
b5cf002751 Release json@5.7.0 json@5.7.0 2025-07-31 13:39:18 +00:00
GitHub Action
69fa907843 Release bloom@5.7.0 bloom@5.7.0 2025-07-31 13:39:11 +00:00
GitHub Action
facc91847e Release client@5.7.0 client@5.7.0 2025-07-31 13:39:03 +00:00
Pavel Pashov
5f09e4a8a5 feat: add EPSILON parameter support to VSIM command (#3041) 2025-07-31 15:11:51 +03:00
Nikolay Karadzhov
d8e14fa4fe fix(scan): remove console.logs (#3038)
fixes #3037
2025-07-28 14:54:50 +03:00
andy-stark-redis
28d719d699 docs: DOC-5074 added vector set doc examples (#3031) 2025-07-25 18:01:05 +03:00
andy-stark-redis
c2dc73c5d8 docs: DOC-5473 added time series doc examples (#3030) 2025-07-25 18:00:46 +03:00