dice icon indicating copy to clipboard operation
dice copied to clipboard

Inconsistent `LPUSH`: Command returns OK instead of Integer(length of list)

Open Aditya-Chowdhary opened this issue 1 year ago • 4 comments

Steps to reproduce

127.0.0.1:7379> lpush mylist "test"

Expected output

The expected output when the above set of commands (maybe when run on Redis)

127.0.0.1:6379> LPUSH mylist "test"
(integer) 1 

Observed output

The observed output when the above set of commands when run on DiceDB

127.0.0.1:7379> lpush mylist "test"
OK

Expectations for resolution

This issue will be considered resolved when the following things are done

  1. changes in the dice code to meet the expected behavior
  2. addition of relevant test case to ensure we catch the regression

You can find the tests under the integration_tests directory of the dice repository and the steps to run are in the README file. Refer to the following links to set up DiceDB and Redis 7.2.5 locally

Aditya-Chowdhary avatar Oct 02 '24 22:10 Aditya-Chowdhary

Hi, I worked on the doc issue for this command, so would like to contribute to this as well. Thank you.

Aditya-Chowdhary avatar Oct 02 '24 22:10 Aditya-Chowdhary

https://github.com/DiceDB/dice/blob/887d693113e266c8525c75b103346ced5fbdf997/integration_tests/commands/async/deque_test.go#L86

according to the tests, this is the expected behaviour I think.

Though ideally it should return integer

probablyArth avatar Oct 03 '24 12:10 probablyArth

Can I work on this?

sanuj96 avatar Oct 04 '24 19:10 sanuj96

@Aditya-Chowdhary assigned, thanks for contributing.

lucifercr07 avatar Oct 05 '24 10:10 lucifercr07

Closing as duplicate PR has been merged.

Aditya-Chowdhary avatar Oct 20 '24 16:10 Aditya-Chowdhary