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

DATAREDIS-1103 - Support new KEEPTTL option of the SET operation #562

Closed
wants to merge 3 commits into from

Conversation

dengliming
Copy link
Contributor

@dengliming dengliming commented Sep 14, 2020

  • You have read the Spring Data contribution guidelines.
  • There is a ticket in the bug tracker for the project in our JIRA.
  • You use the code formatters provided here and have them applied to your changes. Don’t submit any formatting related changes.
  • You submit test cases (unit or integration tests) that back your changes.
  • You added yourself as author in the headers of the classes you touched. Amend the date range in the Apache license header if needed. For new types, add the license header (copy from another file and set the current year only).

@mp911de
Copy link
Member

mp911de commented Oct 5, 2020

Thanks for your pull request. Instead of adding a new method with a different name, we should introduce overloads accepting keepTtl as boolean option. KEEPTTL can be combined with XX and NX but not PX/EX options.

Care to update your pull request?

@dengliming
Copy link
Contributor Author

@mp911de Hi~ Do you mean like this?
Boolean set(byte[] key, byte[] value, Expiration expiration, SetOption option, boolean keepttl);

@mp911de
Copy link
Member

mp911de commented Oct 6, 2020

Yes, exactly.

# Conflicts:
#	src/main/java/org/springframework/data/redis/connection/DefaultStringRedisConnection.java
@dengliming
Copy link
Contributor Author

@mp911de Got it. Thanks. That was updated.

christophstrobl pushed a commit that referenced this pull request Oct 9, 2020
christophstrobl added a commit that referenced this pull request Oct 9, 2020
Move keepTTL to Expiration and remove superfluous methods from interfaces. Add tests for reactive variant and work around an open issue in Jedis to support KEEPTTL though the API does not offer that option directly.

Original Pull Request: #562
@christophstrobl
Copy link
Member

Thank you @dengliming. We changed the original PR a bit and merged it to the main line.
To ensure existing behaviour is not broken or changed, please make sure to run all tests (with the -DrunLongTests=true flag) - thanks!

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.

3 participants