Problem with Spy Memcached get method with multi-thread
I start my test of membase, on a 3-node cluster.
The server and client software I installed are membase-server-community_x86_64_1.6.0.rpm, and memcached-2.5.-26-g0c7b5c1.jar.
The testing code looks like:
ArrayList baseURIs = new ArrayList();
URI base = new URI("http://192.168.15.144:8091/pools"); baseURIs.add(base);
base = new URI("http://192.168.15.145:8091/pools"); baseURIs.add(base);
base = new URI("http://192.168.15.146:8091/pools"); baseURIs.add(base);
MemcachedClient mc = new MemcachedClient(baseURIs, "default", "Admin", "Admin", true);
for(int i=0; i<nThreadNum; i++) new testThread().start(); The testThread call mc.get(key) method. Everything is OK with only 1 thread; but with multi-thread , some calls return null and I get message: "WARN net.spy.memcached.protocol.binary.OptimizedGetImpl: Error on key key00000681: I'm not responsible for this vbucket (7)"However, there's no problem if the testThread calls set or delete method. As far as I know, Spy Memcached works with 1 non-blocking connectione to every server node, the MemcachedClient ought to be thread safe.Probably I have not found the right way of using Spy Memcached. Any ideas ? It's very appreciated if you can show me the right approach of using Spy Memcached :)
Hi Bhawana,
I have no idea of your email, just tried to send to bhawana@membase.org & bhawana@membase.com .
By the way , I am testing under RHEL5.3 , 64 bit.
I received the email with the client code. I have sent back an email to you.
Thanks
Hi bhawana.
I have been experienced the same problem above & I desperately need your help.
If you know the reason or the solution for the problem, plesase let me know.
Thanks in advance.
Which version of spy are you using and which version of Membase? This is a very old issue and has likely been fixed in a later update.
Perry
Hi, Perry.
We are using Membase 1.6.5(enterprise version) & memcached-2.6rc1-36-g1a1deb9.jar for client application.
It seems that you guessed some kind of old versioned memcached, but we are trying the latest.
But, anyway...I'll try memcached-2.5.jar and another versions for client application.
Thanks a lot for your help.
The 2.6rc1 is definitely what you should be using, but the previous problem was coming from a 2.5 release.
Can you describe the issue you're seeing?
Perry
Hi Perry.
We got errors like this :
2011-03-25 10:06:28.125 WARN net.spy.memcached.protocol.binary.OptimizedGetImpl: Error on key /result0/1-113: I'm not responsible for this vbucket (7)
2011-03-25 10:06:28.125 WARN net.spy.memcached.protocol.binary.OptimizedGetImpl: Error on key /topic2/1-EOF: I'm not responsible for this vbucket (7)
It seems that there are several 2.6rc1 versions and the Constructor that we used is somewhat different with 2.5 release.
Due to your advice, We trided 2.5 release (changed constructor) and the problems has gone. (but, we got a different warnings...--;).
So, we'll try 2.6rc1 having same constructor to 2.5 release.
If the problems are fixed, I'll let you know.
Thanks for your advice.
Regards,
casablinca,
Can you please send the full client code?
Thanks
Bhawana
Forum support is great for free but sometimes you need a guaranteed response time and dedicated resources for your questions or issues.
Consider purchasing enterprise-level support from Membase: http://www.membase.com/products-and-services/overview
Call or email "sales -at- membase -dot- com" today!