garnet icon indicating copy to clipboard operation
garnet copied to clipboard

Map deprecated Redis comments to its alternative if its already exist in Garnet

Open Vijay-Nirmal opened this issue 1 year ago • 3 comments

Feature request type

sample request

Is your feature request related to a problem? Please describe

Personally, I don't like to waste our time in implementing deprecated commands. But the issue is that these deprecated Redis comments will not be removed for years before they are removed completely. This means libraries and applications could still continue to use it even it's not recommented.

Describe the solution you'd like

I like to map deprecated comments to its alternative if it's already exist in Garnet

Describe alternatives you've considered

No response

Additional context

I can raise the PR for this if the garnet team is fine with this change.

List of all deprecated comments and their status on where are supported in Garnet

  • [x] GEORADIUS_RO
  • [x] GEORADIUSBYMEMBER_RO
  • [x] SETEX
  • [x] QUIT
  • [x] SUBSTR
  • [ ] BRPOPLPUSH
  • [x] GEORADIUSBYMEMBER
  • [ ] HMSET
  • [x] PSETEX
  • [x] ZREVRANGE
  • [x] GEORADIUS
  • [x] ZRANGEBYLEX
  • [x] GETSET
  • [x] RPOPLPUSH
  • [ ] ZREVRANGEBYLEX
  • [x] ZREVRANGEBYSCORE
  • [x] CLUSTER SLAVES
  • [ ] SLAVEOF
  • [x] ZRANGEBYSCORE
  • [x] CLUSTER SLOTS
  • [x] SETNX

Vijay-Nirmal avatar Sep 23 '24 06:09 Vijay-Nirmal

Good point. Thanks. Please open a PR for this.

yrajas avatar Sep 24 '24 18:09 yrajas

@yrajas Should the deprecated command need to be added as part of IGarnetApi or can it be mapped to the alternative in the network layer (RespServerSession) itself?

Vijay-Nirmal avatar Sep 30 '24 08:09 Vijay-Nirmal

The main advantage of adding support for these older commands is primarily to expand compatibility with existing clients. So, as long as the parsing is supported and mapped to an existing command, we should be good.

yrajas avatar Sep 30 '24 16:09 yrajas