Renchunbing / xmemcached

Automatically exported from code.google.com/p/xmemcached
Apache License 2.0
1 stars 0 forks source link

KeyIterator只能列出5万以内的key #118

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.灌入800万数据,curr_items显示key数据量
2.调用KeyIterator装载key到列表
3.打印key数量

What is the expected output? What do you see instead?

What version of the product are you using? On what operating system?
xmemcached1.3.1+linux

Please provide any additional information below.

Original issue reported on code.google.com by springda...@gmail.com on 26 Mar 2011 at 9:46

GoogleCodeExporter commented 9 years ago
这个功能本来就是利用stats items和stats 
cachedump来获取的,其中stats 
cachedump只是debug接口,并非官方推荐的遍历方法。
我刚测试了下,通过这两个协议确实在大数据量的时候没办��
�获取所有的key,因此不要依赖KeyIterator做遍历。

Original comment by killme2...@gmail.com on 26 Mar 2011 at 10:46

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
memcached内部对stats 
cachedump的大小有限制,具体可以看这个回答
http://stackoverflow.com/questions/4363904/is-there-any-length-limitation-of-res
ult-by-stats-cachedump-in-memcached

我给出的建议就是不要依赖KeyIterator做遍历,这个功能仅在小
数据量的测试中有用,如单元测试等。

Original comment by killme2...@gmail.com on 26 Mar 2011 at 10:49

GoogleCodeExporter commented 9 years ago
thanks!

Original comment by springda...@gmail.com on 28 Mar 2011 at 12:47