Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: FLUSHDB and QWATCH #616

Closed
apoorvyadav1111 opened this issue Sep 19, 2024 · 2 comments · Fixed by #630
Closed

BUG: FLUSHDB and QWATCH #616

apoorvyadav1111 opened this issue Sep 19, 2024 · 2 comments · Fixed by #630
Assignees

Comments

@apoorvyadav1111
Copy link
Contributor

apoorvyadav1111 commented Sep 19, 2024

Hi everyone,

One observation while working on DBSIZE command is when FLUSHDB is executed before QWATCH, the server does not respond further. I will be adding detailed CLI steps soon to reproduce this issue.

Edit: Replication Steps:

  1. Pull latest master
  2. Run server locally
  3. Run either redis-cli -p 7379 or dice-cli for setting values, lets say terminal 1
  4. Run dicedb-cli (important for Qwatch / subscribe), lets say terminal 2
  5. While running the three terminals, run following commands in order.

SETUP:

in terminal 2:
subscribe 'SELECT $key, $value WHERE $key like "match:10?:*" ORDER BY $value desc LIMIT 3'

GET Updates:

in terminal 1:

SET match:100:user:1 23

Simultaneously, terminal 2 should update with following result:

qwatch    from SELECT $key, $value WHERE $key like 'match:10?:*' ORDER BY $value desc LIMIT 3: [['match:100:user:1', '23']]

Try setting new values in terminal 2 if you would like and terminal 1 will update with new values.

BUG

Run the following command in terminal 1

FLUSHDB

Now trying setting new values in terminal 2, but this time around terminal 2 will not receive any new update

Please assign this issue to me.
cc: @JyotinderSingh

Thanks

@TheRanomial
Copy link
Contributor

Hi @apoorvyadav1111 can i work on this one.

@apoorvyadav1111
Copy link
Contributor Author

Hi @TheRanomial , I have been working on this and will be raising a PR soon.
Apoorv

JyotinderSingh added a commit that referenced this issue Sep 23, 2024
Co-authored-by: ayadav16 <ayadav7@binghamton.edu>
Co-authored-by: Jyotinder Singh <jyotindrsingh@gmail.com>
shardul08 pushed a commit to shardul08/dice that referenced this issue Sep 23, 2024
Co-authored-by: ayadav16 <ayadav7@binghamton.edu>
Co-authored-by: Jyotinder Singh <jyotindrsingh@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants