Fix Jedis dbSize and flush ops executing synchronously while in pipeline or tx

DATAREDIS-141
This commit is contained in:
Jennifer Hickey
2013-04-01 10:07:32 -07:00
parent fb25e79380
commit b3a0deebf8
2 changed files with 6 additions and 8 deletions

View File

@@ -349,9 +349,11 @@ public class JedisConnection implements RedisConnection {
try {
if (isQueueing()) {
transaction.dbSize();
return null;
}
if (isPipelined()) {
pipeline.dbSize();
return null;
}
return jedis.dbSize();
} catch (Exception ex) {
@@ -365,9 +367,11 @@ public class JedisConnection implements RedisConnection {
try {
if (isQueueing()) {
transaction.flushDB();
return;
}
if (isPipelined()) {
pipeline.flushDB();
return;
}
jedis.flushDB();
} catch (Exception ex) {
@@ -380,9 +384,11 @@ public class JedisConnection implements RedisConnection {
try {
if (isQueueing()) {
transaction.flushAll();
return;
}
if (isPipelined()) {
pipeline.flushAll();
return;
}
jedis.flushAll();
} catch (Exception ex) {

View File

@@ -68,14 +68,6 @@ public class JedisConnectionPipelineIntegrationTests extends
connection = null;
}
@Ignore("DATAREDIS-141 Jedis dbSize/flush ops execute synchronously while pipelining")
public void testDbSize() {
}
@Ignore("DATAREDIS-141 Jedis dbSize/flush ops execute synchronously while pipelining")
public void testFlushDb() {
}
@Ignore("DATAREDIS-143 Jedis ClassCastExceptions closing pipeline on certain ops")
public void testGetConfig() {
}