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

Unable to get results from pipeline after tx discard #438

Closed
jencompgeek opened this issue Jul 22, 2013 · 0 comments
Closed

Unable to get results from pipeline after tx discard #438

jencompgeek opened this issue Jul 22, 2013 · 0 comments

Comments

@jencompgeek
Copy link

The following code throws Exceptions attempting to get results of a pipelined operation after pipeline.discard() has been called. It looks like the discard op and all future ops are still getting added to the currentMulti ResponseBuilder. I'm seeing this with Jedis 2.1.0.

@Test
    public void testDiscard() {
        Jedis jedis = new Jedis(new JedisShardInfo("localhost", 6379));
        jedis.connect();
        Pipeline pipeline = jedis.pipelined();
        pipeline.multi();
        pipeline.set("foo", "bar");
        Response<String> discard = pipeline.discard();
        Response<String> get = pipeline.get("foo");
        pipeline.sync();
        // Both gets below throw RedisDataException Please close pipeline or multi block before calling this method
        discard.get();
        get.get();
    }
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

No branches or pull requests

2 participants