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

fix list blocking operations #21

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

meteorgan
Copy link
Contributor

about list blocking operations, still have some problems:

  1. not support multi keys. supporting multi keys in multi keyNode needs much more works.
  2. the scheduler in the block function may has race conditions with unblock. Is sending an unblock message in the scheduler a better solution?

@meteorgan
Copy link
Contributor Author

@stephenmcd do you have any advice for this PR?

@stephenmcd
Copy link
Owner

Sorry I didn't have time to look at it yet, the other recent changes were very quick to review.

It might save some time if you can provide a set of commands or a script that reproduces the problem.

@meteorgan
Copy link
Contributor Author

OK, I will do it at this night.

@meteorgan
Copy link
Contributor Author

  1. blpop only blocks 1s no matter how much timeout is setted. Executing blocking operations should not set timeout.
    redis 127.0.0.1:6370> lrange list2 0 -1
    (empty list or set)
    redis 127.0.0.1:6370> blpop list2 5
    (error) ERR Timeout on blpop list2 5
    (1.01s)
  2. this is because in unblock change command to the former block command, but does not change back,so there is no response back.
    a.
    redis 127.0.0.1:6370> blpop list2 30
  1. "list2"
  2. "xxx"
    (6.98s)
    b. block forever
    redis 127.0.0.1:6370> lpush list2 xxx
  1. timeout 0 does not work.
    redis 127.0.0.1:6370> blpop list2 0
    (nil)
  2. scheduler setted in block function is not cancelled in unblock function.

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 this pull request may close these issues.

2 participants