Couchbase
  • Why NoSQL?
  • Couchbase Server
  • Download
  • Resources
  • Careers
Home | Forums | Membase | Memcached Server 1.0.3

Enyim .Net Library Problems

7 replies [Last post]
  • Login or register to post comments
Fri, 07/23/2010 - 03:45
macinnesm
Offline
Joined: 07/22/2010
Groups: None

This has been mentioned [URL=http://forums.membase.com/showthread.php?209-Any-plans-for-a-supported-.Net-Membase-client&p=717&viewfull=1#post717]here[/URL] but I think it deserves it's own thread.

We have also encountered issues with the increment / decrement features of the Enyim lib:

[CODE]Assert.AreEqual(1UL, cache.Increment(key, 1UL, 1UL), "Non-exsiting value should be set to default");
Assert.AreEqual(1UL, cache.Get(key), "Cache should contain value");[/CODE]
The second Assert fails as cache.Get(key) returns NULL.

This happens on a single local instance of windows 7 (x64) based Membase memcache server (v 1.0.3) and using the latest Enyim lib (v 2.2).

Top
Fri, 07/23/2010 - 16:36
Perry Krug
Offline
Joined: 06/02/2010
Groups: None

What is the intial value you are setting the key to? Can you send some sample code of setting and incrementing the key that fails? I will try to reproduce this on our side as well.

Perry

__________________

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!

Top
Fri, 07/23/2010 - 16:52
Perry Krug
Offline
Joined: 06/02/2010
Groups: None

I am able to successfully increment and decrement a key using:
var nsClient = new NorthScaleClient();
nsClient.Store(StoreMode.Set, "test", "1");
nsClient.Increment("test",0,1);

__________________

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!

Top
Tue, 07/27/2010 - 03:14
macinnesm
Offline
Joined: 07/22/2010
Groups: None

Perry Krug;783 wrote:
I am able to successfully increment and decrement a key using:
var nsClient = new NorthScaleClient();
nsClient.Store(StoreMode.Set, "test", "1");
nsClient.Increment("test",0,1);

Sure but you shouldn't need to Set the cache value before calling Increment. The Increment methods supports a default value which is used to initialise the value if it is not already in the cache.

Try this:

[CODE]var nsClient = new NorthScaleClient();
nsClient.FlushAll();

nsClient.Increment("test",1,1);
ulong expected = 1;
var actual = (ulong)nsClient.Get("test");
Assert.AreEqual(expected, actual);

nsClient.Increment("test",1,9);
ulong expected2 = 10;
var actual2 = (ulong)nsClient.Get("test");
Assert.AreEqual(expected2, actual2);[/CODE]

I haven't tested the above as the NorthScale [URL=http://forums.northscale.com/showthread.php?49-NorthScaleServer-Won-t-Start&p=790&posted=1#post790]has died again[/URL] and needs to be re-installed.

Marcus

Top
Tue, 07/27/2010 - 12:17
Perry Krug
Offline
Joined: 06/02/2010
Groups: None

Hmm, you are correct Marcus, I missed that in my first analysis.

I think it is working for me though...looking at the end value of the "test" key from running your code, it is set to 10.

I have since upgraded my Enyim client to the latest version, available here: [url]http://github.com/enyim/EnyimMemcached[/url].

Can you check with the newest version, and I will confirm whether a bug has been fixed?

Thanks!

Perry

__________________

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!

Top
Wed, 07/28/2010 - 05:55
macinnesm
Offline
Joined: 07/22/2010
Groups: None

Hi Perry,

Upgrading to NorthScale.Store.2.3.zip doesn't fix the problem. (BTW Enyim.Caching.dll in that download is sitll 2.2). Are you using the 2.3 binaries downloaded from [url]http://github.com/enyim/EnyimMemcached/downloads[/url] or are you pulling the source and recompiling?

The following Unit Test fails for me:

[CODE][TestMethod]
public void IncrementTest()
{
var nsClient = new NorthScaleClient();
nsClient.FlushAll();

nsClient.Increment("test", 1, 1);
ulong expected = 1;
var actual = nsClient.Get("test");
Assert.AreEqual(expected, (ulong)actual);

nsClient.Increment("test", 1, 9);
ulong expected2 = 10;
var actual2 = nsClient.Get("test");
Assert.AreEqual(expected2, (ulong)actual2);
}[/CODE]
var actual = nsClient.Get("test");

nsClient.Get("test") returns null when it should return 1

Marcus

Top
Wed, 07/28/2010 - 09:58
Perry Krug
Offline
Joined: 06/02/2010
Groups: None

Okay Marcus, I think I've found the bug here...it's definitely something within the client. If you actually look into the server (which is what I was doing initially) you'll see that the key is being set correctly and incremented correctly. There's something within the client that isn't processing the "Get" correctly after an increment has been used to set a key to a default value.

We'll look into this further and hopefully provide a fix as soon as possible.

Thanks for your patience, I'll get back in touch shortly.

Perry

__________________

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!

Top
Fri, 07/30/2010 - 13:40
Perry Krug
Offline
Joined: 06/02/2010
Groups: None

Marcus, the increment issue is fixed in the latest update for the Enyim client. Can you please download NorthScale.Store version 2.4 and try it out?

Thanks much, hope that takes care of it.

Perry

__________________

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!

Top
  • Login or register to post comments
  • Login
  • Register

Company

  • About Us
  • Leadership
  • Customers
  • Partners
  • Contact Us

Product

  • Couchbase Server
  • Couchbase SDKs
  • Use Cases
  • Documentation
  • Forums

Open Source

  • Couchbase Project
  • Couchbase vs. CouchDB

Commercial

  • Subscriptions & Support
  • Training & Services

News

  • Blog
  • Newsletter
  • Press Releases
  • Buzz

Follow Us

    
  • Customer Login
  • Terms of Service
  • Privacy Policy
  • Trademark Policy
  • Site Map

© 2013 COUCHBASE All rights reserved.

Sign in to Couchbase Community

close
  • Create new account
  • Request new password
You are logging into the Forums, Wiki and Issue Tracker