DiceDB / dice

DiceDB is a redis-compliant, reactive, scalable, highly-available, unified cache optimized for modern hardware.
https://dicedb.io/
Other
6.72k stars 1.07k forks source link

Inconsistent `EXPIRE`: EXPIRE with empty string as TTL should report an error #671

Closed lucifercr07 closed 1 month ago

lucifercr07 commented 1 month ago

Steps to reproduce

Run the commands mentioned in the test on Line 81 in the file https://github.com/AshwinKul28/dice-tests/blob/main/tcltests/unit/expire.tcl#L81.

Expected output

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

'*not an integer*'

Observed output

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

'ERR invalid expire time in 'expire' command'

The steps to run the test cases are mentioned in the README of the dice-tests repository.

Expectations for resolution

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

  1. Changes in the dice repository code to meet the expected behavior.
  2. Successful run of the tcl test behavior.

You can find the tests under the 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

Abh-ay commented 1 month ago

@lucifercr07 can i take this up?

AshwinKul28 commented 1 month ago

@Abh-ay Thanks for picking this up. Assigned!

Abh-ay commented 1 month ago

Hi @AshwinKul28 @lucifercr07 Just verify this command in redis and it accept -ve value also refer below ss image And In DiceDB we throw error as ERR invalid expire time in 'expire' command Should we handle this or keep as it is?