Please sign in to comment.
BUGFIX: WATCH + MGET clearing inTransaction prematurely. WATCH + HGET…
…ALL does not use post_proc To reproduce the 1st problem: > t = yield conn.watch(k) > t.mget([k]) > assert t.inTransaction # boOoOm! To reproduce the second problem: > t = yield conn.watch(k) > h = yield t.hgetall(k) > assert type(h) == dict # boOoOm! This commit introduces a `commit_cc' function (similar to `unwatch_cc') which clears the `inTransaction' flag only if there has been a `MULTI' command before (fixes the 1st problem). The second problem is fixed by not delaying using `post_proc' function if only `watch' has been issued.
- Loading branch information...
Showing with 54 additions and 21 deletions.