Permalink
Browse files

If there is an exception return broken resource

  • Loading branch information...
1 parent 07b1f62 commit ef285a8ff2877be27a9ec94e9f168a1dd7c8b1ca Ubuntu committed Nov 20, 2011
Showing with 5 additions and 5 deletions.
  1. +5 −5 db/redis/src/com/yahoo/ycsb/db/RedisClient.java
@@ -108,7 +108,7 @@ public int read(String table, String key, Set<String> fields,
}
}
catch (JedisConnectionException e) {
- pool.returnResource(jedis);
+ pool.returnBrokenResource(jedis);
return 1;
}
pool.returnResource(jedis);
@@ -128,7 +128,7 @@ public int insert(String table, String key, HashMap<String, ByteIterator> values
return 1;
}
catch (JedisConnectionException e) {
- pool.returnResource(jedis);
+ pool.returnBrokenResource(jedis);
return 1;
}
}
@@ -144,7 +144,7 @@ public int delete(String table, String key) {
return r;
}
catch (JedisConnectionException e) {
- pool.returnResource(jedis);
+ pool.returnBrokenResource(jedis);
return 1;
}
}
@@ -158,7 +158,7 @@ public int update(String table, String key, HashMap<String, ByteIterator> values
return r;
}
catch (JedisConnectionException e) {
- pool.returnResource(jedis);
+ pool.returnBrokenResource(jedis);
return 1;
}
}
@@ -179,7 +179,7 @@ public int scan(String table, String startkey, int recordcount,
}
}
catch (JedisConnectionException e) {
- pool.returnResource(jedis);
+ pool.returnBrokenResource(jedis);
return 1;
}

0 comments on commit ef285a8

Please sign in to comment.