lettuce icon indicating copy to clipboard operation
lettuce copied to clipboard

Remove deprecated options and logic as part of the 7.0 release

Open tishun opened this issue 6 months ago • 8 comments

Feature Request

Is your feature request related to a problem? Please describe

The new major release would allow us to do some cleanup of deprecated logic.

High priority

Most of the options below could lead to serious issues and / or have caused confusion about how the driver should be used. Here is a list of the candidates:

  • [x] follow up to #1787 we should completely remove the cancelCommandsOnReconnectFailure option https://github.com/redis/lettuce/pull/3346
  • [x] follow up to #1527 we should completely remove the dnsResolver option https://github.com/redis/lettuce/pull/3333
  • [x] follow up to #1314 we should completely remove the bufferUsageRatio https://github.com/redis/lettuce/pull/3351
  • [x] follow up to #907 we should remove the option to call RedisChannelWriter#reset() https://github.com/redis/lettuce/pull/3395
  • [x] follow up to #1868 we should remove the get/set default timeout options in the AbstractRedisClient https://github.com/redis/lettuce/pull/3344
  • [x] follow up to #2028 clean up the connection-related APIs, e.g. BaseRedisCommands https://github.com/redis/lettuce/pull/3343

Lower priority

The options below are mostly tech-dept, that should not be considered critical. The list below is order in a cherry-pick friendly order (higher up the list means a good candidate for quick change):

  • [x] follow up to #1137 we should remove the Utf8StringCodec class https://github.com/redis/lettuce/pull/3389
  • [ ] follow up to #430 we should remove the wasRolledBack() in TransactionResult
  • [ ] follow up to #845
  • [ ] follow up to #2144
  • [ ] follow up to #2020 we should remove the references to master / slave
  • [x] follow up to #1157 (and other related stories) we should remove all RedisURI methods that are deprecated https://github.com/redis/lettuce/pull/3350
  • [ ] follow up to #570 we should remove all TimeUnit-based APIs, e.g. SocketOptions.connectTimeout, etc.
  • [ ] follow up to #1167 we should clean up the SslOptions interface
  • [ ] follow up to #3037 we should remove the STRALGO in favor of LCS
  • [ ] follow up to #1608 we should remove deprecated methods related to flushing the database
  • [ ] follow up to #363 we should clean up the RedisSortedSetCommands API

Describe the solution you'd like

Remove:

  • the options form the API
  • any related logic in the application associated with them
  • any integration or unit tests associated with them
  • any documentation associated with them
  • any templates that are used to generate command interfaces

Describe alternatives you've considered

N/A

Teachability, Documentation, Adoption, Migration Strategy

N/A

tishun avatar Jun 18 '25 09:06 tishun

@tishun I would like to contribute to this issue. Is the expectation here to check each items separately and address them individually or address all items in one shot ? Kindly advise. Thank you.

The-East-Wind avatar Jun 24 '25 07:06 The-East-Wind

Hey @The-East-Wind ,

You are most welcome to contribute!

I think we should split the work into smaller chunks, so I was thinking each checkbox would be one PR.

If we think we can easily address more with one PR that is also fine.

Thanks!

tishun avatar Jun 24 '25 08:06 tishun

Sure. I'll go over each checkbox then. Thank you.

The-East-Wind avatar Jun 24 '25 10:06 The-East-Wind

@tishun I've raised a PR for follow up to Deprecate lettuce DNS support classes #1527 we should completely remove the dnsResolver option. https://github.com/redis/lettuce/pull/3333. Let me know if it's good to go or if anything else needs to be done. Also should we create a separate issue for each checkbox item or is it fine if everything is tracked via this single issue ?

The-East-Wind avatar Jun 25 '25 19:06 The-East-Wind

No need for filing separate issues, we will keep track in this one.

I am on a leave this week, but will be able to take a look at this when I return next week. Thanks for all your work!

tishun avatar Jun 25 '25 19:06 tishun

Created a PR for follow up to https://github.com/redis/lettuce/issues/1868. @tishun kindly review whenever you find time. Also can you assign this issue to me so that efforts are not duplicated from other contributors. Thanks in advance.

The-East-Wind avatar Jul 02 '25 20:07 The-East-Wind

Hi @tishun!

I'd like to contribute to this issue. I'll start with the Utf8StringCodec class removal (follow up to #1137). I'll create a separate PR for this specific task as you mentioned. Should I proceed with this one?

Thanks for the clear guidelines!

Kiminni avatar Aug 07 '25 14:08 Kiminni

Thanks for all the contributions, everyone!

tishun avatar Aug 08 '25 13:08 tishun