Skip to content

Ensure that JSON.GET returns Nil response #3467

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 231 commits into from

Conversation

ofekshenawa
Copy link
Collaborator

No description provided.

nic-gibson and others added 30 commits April 16, 2024 12:13
Updated JSONCmd.readReply to return redis.Nil if no results
Added a doc line for Val() and Expanded() methods of JSONCmd
Added a test case for non existent keys in json_test.go
* Handle IPv6 in isMovedError

* Simplify GetAddr

---------

Co-authored-by: Monkey <[email protected]>
* Remove skipping span creation by checking parent spans

* Update CHANGELOG
Signed-off-by: monkey92t <[email protected]>
* chore: ignore package.json

* chore: release v9.5.3 (release.sh)
* Change redis version from 7.2 to 7.4

* fix jsonGet test

* Add 'watch' to client info

* Remove jsonGet from Enterprise tests
* Add HExpire command

* Add HPExpire, HexpireAt, HPExpireAt, HTTL, HPTTL, HPersist,HExpireTime, HPExpireTIme, HGetF, HSetF commands

* add docstring

* add tests and fix commands

* modify commands

* api changes

* fix tests

* remove tests from RE
* Added test case for CLIENT KILL with MAXAGE option

* Fixed sleep value

* Added additional condition to kill specific connection

* Test commit

* Test commit

* Updated test case to handle timeouts

---------

Co-authored-by: ofekshenawa <[email protected]>
* Support NOVALUES parameter for HSCAN

Issue #2919

The NOVALUES parameter instructs HSCAN to only return the hash keys,
without values.

* Update hash_commands.go

---------

Co-authored-by: ofekshenawa <[email protected]>
* add support for XREAD last entry

* handle reading from multiple streams

* add test to ensure we block for empty stream

* small tweak

* add an option to XReadArgs instead

* modify test comment

* small preallocation optimization

* Changed argument to generic ID, skip tests on Enterprise

* Fix test case

* Updated expiration command

---------

Co-authored-by: Vladyslav Vildanov <[email protected]>
Co-authored-by: vladvildanov <[email protected]>
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.20.0 to 0.23.0.
- [Commits](golang/net@v0.20.0...v0.23.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Monkey <[email protected]>
Signed-off-by: Andrew Haines <[email protected]>
Co-authored-by: Monkey <[email protected]>
* Add RediSearch Support

* searach

* Add RediSearch commands and tests

* Adding more tests and fixing commands

* Remove unnecessary additions

* fixing tests

* fixing tests

* fixing tests

* fixing FTConfig dialect test

* fix commects

* make enum for field types

* Support resp 2

* fix golang ci

* fix ftinfo

---------

Co-authored-by: Chayim <[email protected]>
Bumps [rojopolis/spellcheck-github-actions](https://github.com/rojopolis/spellcheck-github-actions) from 0.36.0 to 0.38.0.
- [Release notes](https://github.com/rojopolis/spellcheck-github-actions/releases)
- [Changelog](https://github.com/rojopolis/spellcheck-github-actions/blob/master/CHANGELOG.md)
- [Commits](rojopolis/spellcheck-github-actions@0.36.0...0.38.0)

---
updated-dependencies:
- dependency-name: rojopolis/spellcheck-github-actions
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Monkey <[email protected]>
* Change monitor test to run manually

* fix
Change context.Background() to ctx
* fix node routing when all nodes are failing

* fix minlatency zero value
Co-authored-by: Monkey <[email protected]>
Co-authored-by: Vladyslav Vildanov <[email protected]>
…ireWithArgs expiration (#3038)

* Support Hash-field expiration commands in Pipeline

* Fix HExpire & HExpireWithArgs expiration

* Fix HExpire & HPExpire Testcase

* Update commands_test.go

---------

Co-authored-by: ofekshenawa <[email protected]>
Co-authored-by: Monkey <[email protected]>
* TimeSeries insertion filters for close samples

* fix

* fix

* fix

* fix

* fix

---------

Co-authored-by: Vladyslav Vildanov <[email protected]>
* add a check for TLS connections.
Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 4 to 6.
- [Release notes](https://github.com/golangci/golangci-lint-action/releases)
- [Commits](golangci/golangci-lint-action@v4...v6)

---
updated-dependencies:
- dependency-name: golangci/golangci-lint-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Monkey <[email protected]>
* Support RediSearch empty values

* Remove from enterprise
* Add tests for search GEO

* Remove from enterprise
* Test dialect 4

* Add support for num and email

* remove tests from RE
pete-woods and others added 28 commits August 11, 2025 01:42
… client (#2623)

- At present, the `scan` command is dispatched to a random slot.
- As far as I can tell, the scanX family of commands are not cluster aware (e.g. don't redirect the client to the correct slot).
- You can see [here](https://github.com/redis/jedis/blob/869dc0bb6625b85c8bf15bf1361bde485a304338/src/main/java/redis/clients/jedis/ShardedCommandObjects.java#L101), the Jedis client calling `processKey` on the match argument, and this is what this PR also does.

We've had this patch running in production, and it seems to work well for us.

For further thought:
- Continuing looking at other Redis clients (e.g. Jedis), they outright [reject as invalid](https://github.com/redis/jedis/blob/869dc0bb6625b85c8bf15bf1361bde485a304338/src/main/java/redis/clients/jedis/ShardedCommandObjects.java#L98) any scan command that does not include a hash-tag. Presumably this has the advantage of users not being surprised when their scan produces no results when a random server is picked.
- Perhaps it would be sensible for go-redis to do the same also?

Co-authored-by: Nedyalko Dyakov <[email protected]>
* chore(release): update version to 9.11.0

* chore(release): Add Release Notes for v9.11.0
* Add support for new bitop operations

* chore(ci): Add 8.2 pre build for CI

* feat(info): add new client info keys

* fixed tests

* added godocs for bitop commands

---------

Co-authored-by: Nedyalko Dyakov <[email protected]>
Co-authored-by: Nedyalko Dyakov <[email protected]>
* [ISSUE-3402]: Ring.Pipelined return dial timeout error

* review fixes

---------

Co-authored-by: Nedyalko Dyakov <[email protected]>
Same as 3d4310a but for FailoverOptions.

Signed-off-by: Julien Riou <[email protected]>
* added new stream commands

* updated docker image

* fixed command return type

* fixed tests

* addressed PR comments

---------

Co-authored-by: Nedyalko Dyakov <[email protected]>
Signed-off-by: Xiaolong Chen <[email protected]>
* fix(search): return results even if doc is empty

"If a relevant key expires while a query is running, an attempt to load
the key's value will return a null array. However, the key is still
counted in the total number of results." - Redis Search return
documentation

* fix(doctest): fix assertions in doctests
* chore(ci): Add 8.2 rc2 pre build for CI

* Updated gh username

---------

Co-authored-by: Hristo Temelski <[email protected]>
* Add VAMANA vector type to redisearch

* Change to svs-vamana vector type && remove panics from search module

* fix tests

* fix tests

* fix tests
* updated stale issue policy

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

* Adds a temporary dry run

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

---------

Signed-off-by: Elena Kolevska <[email protected]>
* add configurable buffer sizes for Redis connections

* add MiB to wordlist

* Add description for buffer size parameter
* DOC-5472 added and fixed tests up to

* DOC-5472 added agg bucket examples

* DOC-5472 time series doc examples

* DOC-5472 removed black lines above error checks, following feedback

* DOC-5472 fixed param formatting, following feedback

---------

Co-authored-by: Nedyalko Dyakov <[email protected]>
* 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]>

---------

Co-authored-by: Nedyalko Dyakov <[email protected]>
- replace two similar functions `appendUniqueNode` and `appendIfNotExists` with a generic function.

- simplify the implementation of the `get` method in `clusterNodes`

- keep the member name `_generation` of `clusterNodes` consistent with other types.

- rename a data member `_masterAddr` to `masterAddr`.

Signed-off-by: Xiaolong Chen <[email protected]>
…2940)

* specify custom health check func via ShardHealthCheckFn option

* ShardHealthCheckFn renamed to HeartbeatFn

---------

Co-authored-by: Mykhailo Alipa <[email protected]>
Co-authored-by: ofekshenawa <[email protected]>
Co-authored-by: Nedyalko Dyakov <[email protected]>
Co-authored-by: Nedyalko Dyakov <[email protected]>
The current append twice to `conf.attrs` approach in `reportPoolStats` may result in unexpected idleAttrs,
due to `append` [can mutate](golang/go#29115 (comment)) the underlying array of the original slice,
as demonstrated at <https://go.dev/play/p/jwRMofH91eQ?v=goprev>.

Also, I replaced `metric.WithAttributes` in `reportPoolStats` with `metric.WithAttributeSet`,
since `WithAttributes` is just `WithAttributeSet` with some extra works that are not needed here,
see <https://pkg.go.dev/go.opentelemetry.io/otel/[email protected]#WithAttributes>.

Co-authored-by: Nedyalko Dyakov <[email protected]>
* feat: recover addIdleConn may occur panic

Signed-off-by: monkey92t <[email protected]>

* fix test race

Signed-off-by: monkey92t <[email protected]>

---------

Signed-off-by: monkey92t <[email protected]>
Co-authored-by: Nedyalko Dyakov <[email protected]>
Updated JSONCmd.readReply to return redis.Nil if no results.
Added a doc line for Val() and Expanded() methods of JSONCmd.
Added a test case for non existent keys in json_test.go.

Original-PR: #2987
@ofekshenawa ofekshenawa changed the title Goslogan json nil response Ensure that JSON.GET returns Nil response Aug 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.