Closed GoogleCodeExporter closed 9 years ago
这种情况没有碰到过。你要有测试代码可以附件发上来,我��
�照你的代码尝试重现看看。其次,想请教下怎么开关网卡,�
��道修改bios设定?
Original comment by killme2...@gmail.com
on 16 Jun 2011 at 8:33
public class Test {
private static MemcachedClient mc = null;
public static void main(String[] args) throws Exception {
XMemcachedClientBuilder builder = new XMemcachedClientBuilder(
AddrUtil.getAddresses("10.0.30.81:11211 10.0.30.81:11212 10.0.30.81:11213 10.0.30.81:11214 10.0.30.81:11215"));
builder.setCommandFactory(new BinaryCommandFactory());
builder.setSessionLocator(new KetamaMemcachedSessionLocator());
builder.setTranscoder(new SerializingTranscoder());
mc = builder.build();
final String key = "store_key_test_1";
mc.set(key, 0, "store_value_test_1");
for (int i = 0; i < 10; i++) {
new Thread(new Runnable() {
public void run() {
while (true) {
try {
testGet();
} catch (Exception e) {
sleep();
}
}
}
private void testGet() throws Exception {
String fileName = mc.get(key);
if (fileName == null) {
System.out
.println("=================== test get value is nul: "
+ key);
}
}
private void sleep() {
try {
Thread.sleep(200);
} catch (Exception e) {
e.printStackTrace();
}
}
}).start();
}
}
}
windows下:网络连接-》本地连接-》停用-》启用-》停用-》启��
�
Original comment by springda...@gmail.com
on 17 Jun 2011 at 5:46
这个问题的出现是这样,你有多台memcached按照一致性哈希组��
�环,那么当get的那台memcached断开的时候,会查找下一台去get�
��下一台肯定没数据,返回的就是null。
Original comment by killme2...@gmail.com
on 18 Jun 2011 at 12:45
如果你用一台来测试的话,那肯定会跑出异常的。
Original comment by killme2...@gmail.com
on 18 Jun 2011 at 12:46
如果你希望在网络短暂异常的情况下抛出异常而不是查找下��
�个,可以考虑用failure mode.
Original comment by killme2...@gmail.com
on 18 Jun 2011 at 12:46
有没有后续反馈?没有我将关闭这个issue
Original comment by killme2...@gmail.com
on 25 Jun 2011 at 12:04
可以关闭了,谢谢!
Original comment by springda...@gmail.com
on 27 Jun 2011 at 12:59
Original comment by killme2...@gmail.com
on 27 Jun 2011 at 1:49
我就一台机器,内存设置是1500M,每条数据是803个字节,插入
100万条数据,然后轮询其中的数据,得到的都是空
Original comment by zhang...@gmail.com
on 8 Sep 2011 at 6:50
Original issue reported on code.google.com by
springda...@gmail.com
on 16 Jun 2011 at 3:05