Skip to content
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

Redis client filters the null values with the mget command #28049

Closed
Plawn opened this issue Sep 19, 2022 · 4 comments · Fixed by #28056
Closed

Redis client filters the null values with the mget command #28049

Plawn opened this issue Sep 19, 2022 · 4 comments · Fixed by #28056
Labels
area/redis kind/bug Something isn't working
Milestone

Comments

@Plawn
Copy link

Plawn commented Sep 19, 2022

Describe the bug

In the redis documentation, here : https://redis.io/commands/mget/

The missing values should be returned as null, it enables to detect in an efficient way, which keys are missing or have been deleted due to timeout policies.

However, the implementation of the ReactiveRedisClient uses the io.quarkus.redis.runtime.datasource.Marshaller which filters this values with the method #decodeAsOrderedMap.

The null values should not be filtered and the user should do it, if necessary.

Expected behavior

More compliance with the redis documentation, and non filtered null values.

Actual behavior

The null values are filtered by default.

How to Reproduce?

  1. Create a quarkus app with version 2.12.2.Final
  2. Create a ReactiveRedisDatasource
  3. use the mget command to fetch non existing values
  4. Recover an empty map

Output of uname -a or ver

No response

Output of java -version

No response

GraalVM version (if different from Java)

No response

Quarkus version or git rev

2.12.2.Final

Build tool (ie. output of mvnw --version or gradlew --version)

maven

Additional information

No response

@Plawn Plawn added the kind/bug Something isn't working label Sep 19, 2022
@quarkus-bot
Copy link

quarkus-bot bot commented Sep 19, 2022

/cc @cescoffier, @gsmet, @machi1990

@cescoffier
Copy link
Member

One solution would be to have the entries in the map (key -> null). Would that work for you?

@Plawn
Copy link
Author

Plawn commented Sep 19, 2022

Yes thats perfect !, we just have to remove the null check, it should not be breaking anything as the filter was not stated in the documentation

@cescoffier
Copy link
Member

@Plawn See #28056.

@quarkus-bot quarkus-bot bot added this to the 2.14 - main milestone Sep 19, 2022
@Plawn Plawn changed the title Redis client filters the null values for with the mget command Redis client filters the null values with the mget command Sep 20, 2022
@gsmet gsmet modified the milestones: 2.14 - main, 2.13.0.Final Sep 20, 2022
gsmet pushed a commit to gsmet/quarkus that referenced this issue Sep 20, 2022
… closer to the Redis semantic.

Fix quarkusio#28049.

(cherry picked from commit ca68abb)
igorregis pushed a commit to igorregis/quarkus that referenced this issue Oct 16, 2022
igorregis pushed a commit to igorregis/quarkus that referenced this issue Oct 16, 2022
igorregis pushed a commit to igorregis/quarkus that referenced this issue Oct 16, 2022
igorregis pushed a commit to igorregis/quarkus that referenced this issue Oct 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/redis kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants