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

HMSET deprecated in version 4.0.0 #1217

Closed
hodur opened this issue Feb 6, 2020 · 5 comments
Closed

HMSET deprecated in version 4.0.0 #1217

hodur opened this issue Feb 6, 2020 · 5 comments
Labels
type: feature A new feature
Milestone

Comments

@hodur
Copy link

hodur commented Feb 6, 2020

HMSET has been considered deprecated since Redis 4.0.0. Instead HSET is variadic and returns the number of fields added.

I'd expect to be able to use HSET through lettuce with multiple key/value pairs. Looking at the code the obvious solutions seems to be adding String hset(K key, Map<K, V> map); to the api (along with the async and reactive equivalents). When executed against Redis servers <4.0.0 the error property on the command output would be set to what Redis throws on older versions.

@hodur hodur added the type: feature A new feature label Feb 6, 2020
@mp911de
Copy link
Collaborator

mp911de commented Feb 6, 2020

Thanks for the hint. It makes sense to reflect these changes in our API and introduce long hset(K, Map) including reactive and async variants and deprecate hmset. Care to submit a pull request? The API is generated and method templates can be found in src/main/templates and the generator is located in the test sources (io.lettuce.apigenerator.GenerateCommandInterfaces).

@mp911de mp911de added this to the 5.3.0 milestone Feb 6, 2020
@hodur
Copy link
Author

hodur commented Feb 7, 2020

I'm getting errors after generating. When I run the generator on the 5.3.x branch with the code untouched it removes both dispatch(ProtocolKeyword ...) methods from all three RedisSentinelCommands interfaces.

@mp911de
Copy link
Collaborator

mp911de commented Feb 7, 2020

You might want to revert all touched classes except the Hash-related ones.

@mp911de mp911de linked a pull request Feb 10, 2020 that will close this issue
mp911de pushed a commit that referenced this issue Feb 10, 2020
mp911de added a commit that referenced this issue Feb 10, 2020
Add since and author tags. Guard tests for appropriate Redis version.

Original pull request: #1220.
mp911de pushed a commit that referenced this issue Feb 10, 2020
mp911de added a commit that referenced this issue Feb 10, 2020
Add since and author tags. Guard tests for appropriate Redis version.

Original pull request: #1220.
@mp911de
Copy link
Collaborator

mp911de commented Feb 10, 2020

Thank you for your contribution. That's merged, polished, and forwardported now.

@mp911de mp911de closed this as completed Feb 10, 2020
@hodur
Copy link
Author

hodur commented Feb 10, 2020

Glad to be of help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature A new feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants