DiceDB / dice

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

Inconsistent `LRANGE`: using LRANGE it is creating panic and closing the server abruptly #1271

Closed shashi-sah2003 closed 1 week ago

shashi-sah2003 commented 1 week ago

Steps to reproduce

  1. RPUSH mylist "one"
  2. RPUSH mylist "two"
  3. RPUSH mylist "three"
  4. LRANGE mylist -3 2

Expected output

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

image

Observed output

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

image

Error: image

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 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

shashi-sah2003 commented 1 week ago

hey @JyotinderSingh @apoorvyadav1111 @lucifercr07 I would like to work on this, pls assign thanks

JyotinderSingh commented 1 week ago

hey @JyotinderSingh @apoorvyadav1111 @lucifercr07 I would like to work on this, pls assign

thanks

Assigned

srinivasan1995 commented 1 week ago

Hey @shashi-sah2003, just started looking into repo to understand project (tried running dicedb locally with dicedb client) and tried replicating issue but couldn't see the issue, is the issue on redis-client side?

checked out dicedb below commit for issue replication (latest master )

commit 51ccd048688ca01faaf698f9d850bda50cc875eb (HEAD, origin/master, origin/HEAD)
Author: Shashi sah <86319846+shashi-sah2003@users.noreply.github.com>
Date:   Tue Nov 12 12:32:46 2024 +0545

    #1193: Add type check for string compatibility in evalAPPEND function (#1237)
(END)

dicedb-cli commit


commit 2c98a6a1b507dd2527720394f37c79d047b94eac (HEAD -> master, origin/master, origin/HEAD)
Author: KaviiSuri <surikavii@gmail.com>
Date:   Mon Nov 4 22:14:30 2024 +0530

    fix: add readable dice colors (#9)
dicedb> RPUSH mylist "one"
1
dicedb>  RPUSH mylist "two"
2
dicedb> RPUSH mylist "three"
3
dicedb> LRANGE mylist 0 0
1) one
dicedb> LRANGE mylist -3 2
1) one
2) two
3) three
shashi-sah2003 commented 1 week ago

hey @srinivasan1995 I have produced the above issue using redis-cli and I was on latest pull of master branch as well