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

RedisClient's pipeline throw Exception when in concurrent mode #40

Open
carlvine500 opened this issue Jul 4, 2014 · 0 comments
Open

Comments

@carlvine500
Copy link

version:
com.github.spullara.redis
client
0.8-SNAPSHOT

test code:
private static final String ip = "192.168.152.128";
private static RedisClient rc = null;
private static final int port = 6379;
final static String value = new String(new byte[8]);
public static void main(String[] args) throws InterruptedException, IOException {
rc = new RedisClient(ip, port);
final AtomicLong i = new AtomicLong();
// concurrent no. is 500,total task is 100000
StressTestUtils.testAndPrint(500, 100000, new StressTask() {
@OverRide
public Object doTask() throws Exception {
Pipeline pipeline = rc.pipeline();
ListenableFuture set2 = pipeline.set("testMe_" + i.incrementAndGet(), value);
ListenableFuture sync = pipeline.sync();
Object result = sync.get().data();
//System.out.println(result);
return null;
}
});
}

exception:
11:33:31.390 [main] ERROR c.t.s.c.SimpleResultFormater - Test exception
java.util.concurrent.ExecutionException: java.io.IOException: Improper line ending: 42, 49
at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:222) ~[na:1.6.0_37]
at java.util.concurrent.FutureTask.get(FutureTask.java:83) ~[na:1.6.0_37]
at com.gome.service.RedisProtocalTest$1.doTask(RedisProtocalTest.java:48) ~[classes/:na]
at com.taobao.stresstester.core.StressTester.warmUp(StressTester.java:46) [stresstester-1.0.jar:na]
at com.taobao.stresstester.core.StressTester.test(StressTester.java:63) [stresstester-1.0.jar:na]
at com.taobao.stresstester.core.StressTester.test(StressTester.java:55) [stresstester-1.0.jar:na]
at com.taobao.stresstester.StressTestUtils.test(StressTestUtils.java:19) [stresstester-1.0.jar:na]
at com.taobao.stresstester.StressTestUtils.testAndPrint(StressTestUtils.java:31) [stresstester-1.0.jar:na]
at com.taobao.stresstester.StressTestUtils.testAndPrint(StressTestUtils.java:27) [stresstester-1.0.jar:na]
at com.gome.service.RedisProtocalTest.main(RedisProtocalTest.java:39) [classes/:na]
java.io.IOException: Improper line ending: 42, 49
at redis.RedisProtocol.readBytes(RedisProtocol.java:88) ~[protocol-0.8-SNAPSHOT.jar:na]
at redis.RedisProtocol.receive(RedisProtocol.java:151) ~[protocol-0.8-SNAPSHOT.jar:na]
at redis.RedisProtocol.receiveAsync(RedisProtocol.java:174) ~[protocol-0.8-SNAPSHOT.jar:na]
at redis.client.RedisClientBase$2.call(RedisClientBase.java:181) ~[client-0.8-SNAPSHOT.jar:na]
at redis.client.RedisClientBase$2.call(RedisClientBase.java:1) ~[client-0.8-SNAPSHOT.jar:na]
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) ~[na:1.6.0_37]
at java.util.concurrent.FutureTask.run(FutureTask.java:138) ~[na:1.6.0_37]
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) ~[na:1.6.0_37]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) ~[na:1.6.0_37]
at java.lang.Thread.run(Thread.java:662) ~[na:1.6.0_37]
11:33:31.395 [main] ERROR c.t.s.c.SimpleResultFormater - Test exception
java.util.concurrent.ExecutionException: java.io.IOException: Unexpected character in stream: 10
at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:222) ~[na:1.6.0_37]
at java.util.concurrent.FutureTask.get(FutureTask.java:83) ~[na:1.6.0_37]
at com.gome.service.RedisProtocalTest$1.doTask(RedisProtocalTest.java:48) ~[classes/:na]
at com.taobao.stresstester.core.StressTester.warmUp(StressTester.java:46) [stresstester-1.0.jar:na]
at com.taobao.stresstester.core.StressTester.test(StressTester.java:63) [stresstester-1.0.jar:na]
at com.taobao.stresstester.core.StressTester.test(StressTester.java:55) [stresstester-1.0.jar:na]
at com.taobao.stresstester.StressTestUtils.test(StressTestUtils.java:19) [stresstester-1.0.jar:na]
at com.taobao.stresstester.StressTestUtils.testAndPrint(StressTestUtils.java:31) [stresstester-1.0.jar:na]
at com.taobao.stresstester.StressTestUtils.testAndPrint(StressTestUtils.java:27) [stresstester-1.0.jar:na]
at com.gome.service.RedisProtocalTest.main(RedisProtocalTest.java:39) [classes/:na]

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

1 participant