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

dealing with some edge cases and documenting the new WATCH functionality #34

Merged
merged 1 commit into from Dec 21, 2012
Merged

Conversation

dgvncsz0f
Copy link
Contributor

This patch deals with the following scenarios, which would ended up
cleaning the inTransaction prematurely:

  1. UNWATCH after MULTI

    t = multi
    t.unwatch

  2. WATCH, MULTI (with keys)

    t = watch
    t.multi("foobar")
    t.unwatch

3 . MULTI + WATCH

t = multi
t.watch # this is invalid, but
will change the _unwatch_cc
to a function that would clear
the inTransaction state

I've also dropped a couple more tests, notably testing WATCH with ConnectionPool.

This patch deals with the following scenarios, which would ended up
cleaning the inTransaction prematurely:

1. UNWATCH after MULTI

  t = multi
  t.unwatch

2. WATCH, MULTI (with keys)

  t = watch
  t.multi("foobar")
  t.unwatch

3 . MULTI + WATCH

  t = multi
  t.watch   # this is invalid, but
              will change the _unwatch_cc
              to a function that would clear
              the inTransaction state

I've also dropped a couple more tests, notably testing WATCH with ConnectionPool.
@dgvncsz0f
Copy link
Contributor Author

Probably these cases will never show up in production code, but better fix them before ruining someones day :-)

gleicon added a commit that referenced this pull request Dec 21, 2012
dealing with some edge cases and documenting the new WATCH functionality
@gleicon gleicon merged commit 20b55ff into IlyaSkriblovsky:master Dec 21, 2012
@gleicon
Copy link
Contributor

gleicon commented Dec 21, 2012

Thanks

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.

None yet

2 participants