18 Commits
Author SHA1 Message Date
BigskandGitHub cd984fae99 chore(ring): inline rendezvous hashing and remove external dependency (#3762)
* ring: remove external rendezvous dependency by inlining implementation

Replace usage of github.com/dgryski/go-rendezvous with an internal
implementation to eliminate the external dependency and avoid licence
propagation concerns.

The implementation preserves the exact hashing algorithm and behaviour:
- same hash combination: khash ^ nhash
- same mixing function (xorshift* variant)
- same node ordering semantics

No functional changes intended.

* Refactor TestRendezvous to remove randomString function

Replaced function with inline string generation for test cases.

* test: refactor RendezvousHash tests to use Ginkgo and Gomega

* test: improve RendezvousHash test for per-instance determinism and distribution balance

* test: enhance distribution verification in RendezvousHash tests
2026-04-07 10:26:18 +03:00
8eca179665 feat(command): Implement ReplicaOf method to replace deprecated SlaveOf (#3720)
* Initial plan

* Implement ReplicaOf method and update test usages

Co-authored-by: ndyakov <[email protected]>

* Run go fmt on modified files

Co-authored-by: ndyakov <[email protected]>

* Final review completed

Co-authored-by: ndyakov <[email protected]>

---------

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: ndyakov <[email protected]>
Co-authored-by: ofekshenawa <[email protected]>
2026-03-09 13:35:16 +02:00
a881cd4280 fix(clone): nil pointer dereference in PubSub after WithTimeout() (#3710)
* Initial plan

* Fix pubSubPool nil pointer in clone() method

Co-authored-by: ndyakov <[email protected]>

* Final: Fix complete and verified

Co-authored-by: ndyakov <[email protected]>

---------

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: ndyakov <[email protected]>
2026-02-16 10:44:37 +02:00
ee6e9dbf09 feat(otel): Add OpenTelemetry Native Metrics Support (#3637)
* First draft. One metric - command duration.

Signed-off-by: Elena Kolevska <[email protected]>

* Adds connection state metrics

Signed-off-by: Elena Kolevska <[email protected]>

* wip

Signed-off-by: Elena Kolevska <[email protected]>

* Add phase 1 metrics

* Add client api configurations

* remove redundent code

* refactor: move otel-metrics example to separate module

* refactor: move otel-metrics example to separate module

* remove internal test

* Resolve merge conflicts with upstream/master

* Fix linting issues

* Fix pool idle connection counter bug

* Add OTel performance benchmarking suite

* Improve perf compatison script

* Add phase 2,3 metrics

* Remove local benchmark tests

* Add new fields to tests

* Change db.client.connection.count and db.client.connection.pending_request metric type from UpAndDownCounter to Async gauge.

* fix golangci lint

* Add piplined commands metrics support

* Redesign otel init method

* Address comments

* Fix golangci-lint errors

* Fix passing nil pointer

* Add metric prefix to callbacks and atomic batch registration

* Add unique name for pool.name attr

* Fix unique pool name for pubsub

* Refactor all hardcoded OTel attribute strings to use constants

* Refactor all hardcoded OTel attribute strings to use constants

* extract metric names and pool names as constants, improve error handling

---------

Signed-off-by: Elena Kolevska <[email protected]>
Co-authored-by: Elena Kolevska <[email protected]>
2026-02-13 18:08:10 +02:00
f711eb0f62 feat(cluster): Implement Request and Response Policy Based Routing in Cluster Mode (#3422)
* Add search module builders and tests (#1)

* Add search module builders and tests

* Add tests

* Use builders and Actions in more clean way

* Update search_builders.go

Co-authored-by: Nedyalko Dyakov <[email protected]>

* Update search_builders.go

Co-authored-by: Nedyalko Dyakov <[email protected]>

* Apply suggestions from code review

Co-authored-by: Nedyalko Dyakov <[email protected]>

* feat(routing): add internal request/response policy enums

* feat: load the policy table in cluster client (#4)

* feat: load the policy table in cluster client

* Remove comments

* modify Tips and command pplicy in commandInfo (#5)

* centralize cluster command routing in osscluster_router.go and refactor osscluster.go (#6)

* centralize cluster command routing in osscluster_router.go and refactor osscluster.go

* enalbe ci on all branches

* Add debug prints

* Add debug prints

* FIX: deal with nil policy

* FIX: fixing clusterClient process

* chore(osscluster): simplify switch case

* wip(command): ai generated clone method for commands

* feat: implement response aggregator for Redis cluster commands

* feat: implement response aggregator for Redis cluster commands

* fix: solve concurrency errors

* fix: solve concurrency errors

* return MaxRedirects settings

* remove locks from getCommandPolicy

* Handle MOVED errors more robustly, remove cluster reloading at exectutions, ennsure better routing

* Fix: supports Process hook test

* Fix: remove response aggregation for single shard commands

* Add more preformant type conversion for Cmd type

* Add router logic into processPipeline

---------

Co-authored-by: Nedyalko Dyakov <[email protected]>

* remove thread debugging code

* remove thread debugging code && reject commands with policy that cannot be used in pipeline

* refactor processPipline and cmdType enum

* remove FDescribe from cluster tests

* Add tests

* fix aggregation test

* fix mget test

* fix mget test

* remove aggregateKeyedResponses

* added scaffolding for the req-resp manager

* added default policies for the search commands

* split command map into module->command

* cleanup, added logic to refresh the cache

* added reactive cache refresh

* revert cluster refresh

* fixed lint

* addresed first batch of comments

* rewrote aggregator implementations with atomic for native or nearnative primitives

* addressed more comments, fixed lint

* added batch aggregator operations

* fixed lint

* updated batch aggregator, fixed extractcommandvalue

* fixed lint

* added batching to aggregateResponses

* fixed deadlocks

* changed aggregator logic, added error params

* added preemptive return to the aggregators

* more work on the aggregators

* updated and and or aggregators

* fixed lint

* added configurable policy resolvers

* slight refactor

* removed the interface, slight refactor

* change func signature from cmdName to cmder

* added nil safety assertions

* few small refactors

* added read only policies

* removed leftover prints

* Rebased to master, resolved comnflicts

* fixed lint

* updated gha

* fixed tests, minor consistency refactor

* preallocated simple errors

* changed numeric aggregators to use float64

* speculative test fix

* Update command.go

Co-authored-by: Nedyalko Dyakov <[email protected]>

* Update main_test.go

Co-authored-by: Nedyalko Dyakov <[email protected]>

* Add static shard picker

* Fix nil value handling in command aggregation

* Modify the Clone method to return a shallow copy

* Add clone method to digest command

* Optimize keyless command routing to respect ShardPicker policy

* Remove MGET references

* Fix MGET aggregation to map individual values to keys across shards

* Add clone method to hybrid search commands

* Undo changes in route keyless test

* remove comments

* Add test for DisableRoutingPolicies option

* Add Routing Policies Comprehensive Test Suite and Fix multi keyed aggregation for different step

---------

Co-authored-by: Nedyalko Dyakov <[email protected]>
Co-authored-by: Nedyalko Dyakov <[email protected]>
Co-authored-by: Hristo Temelski <[email protected]>
2025-11-28 11:46:23 +02:00
Flcã‚›andGitHub 40e049e67a chore(deps): update github.com/cespare/xxhash/v2 to v2.3.0 (#3265)
* chore(deps): update github.com/cespare/xxhash/v2 to v2.3.0

* chore(deps): update github.com/cespare/xxhash/v2 to v2.3.0
2025-02-10 15:03:50 +02:00
Vladimir MihailencoandGitHub f752b9a9d5 Release/v9.5.3 (#3018)
* chore: ignore package.json

* chore: release v9.5.3 (release.sh)
2024-06-07 17:04:08 +03:00
MonkeyandGitHub ad89a97fdc chore: update go mod, Upgrade golang.org/x/net version to 0.7.0 (#2476)
Signed-off-by: monkey92t <[email protected]>
2023-03-06 19:42:42 +08:00
Lucas CaparelliandGitHub 206ad44196 chore: bump Go to 1.18 (#2428) 2023-02-08 09:07:42 +02:00
Dimitrij Denissenko 7fa451c740 chore: fewer test dependencies 2023-01-27 15:01:50 +00:00
Vladimir Mihailenco d9c1775b88 chore: release v9.0.0-rc.3 (release.sh) 2023-01-24 15:54:58 +02:00
Vladimir Mihailenco 97b491aace chore: update import path 2023-01-23 08:48:54 +02:00
Vladimir Mihailenco 0b7ced8baf chore: release v9.0.0-rc.2 (release.sh) 2022-11-26 14:20:33 +02:00
Vladimir Mihailenco e84461f7ed chore: release v9.0.0-rc.1 (release.sh) 2022-10-14 15:19:56 +03:00
Vladimir Mihailenco 2e174a228f chore: release v9.0.0-beta.2 (release.sh) 2022-07-28 15:40:09 +03:00
Vladimir Mihailenco 58e087fe08 chore: release v9.0.0-beta.1 (release.sh) 2022-06-04 18:02:11 +03:00
hidu 187c07c41b fix: example/otel compile error (#2028) 2022-02-18 22:59:59 +08:00
Vladimir Mihailenco 507203108a chore: add Lua scripting example 2021-09-27 17:29:41 +03:00