Couchbase
  • Why NoSQL?
  • Couchbase Server
  • Download
  • Resources
  • Careers
Home | Forums | SDKs | SDKs

IMemcachedClient.Cas StatusCode -1

4 replies [Last post]
  • Login or register to post comments
Wed, 09/26/2012 - 13:32
pdubs_tr
Offline
Joined: 03/20/2012
Groups: None

I'm trying to modify Couchbase.AspNet.CouchbaseSessionStateProvider to throw an exception if it cannot write to the backing Couchbase bucket (right now it silently buries the error, making it difficult to debug or give meaningful error messages). I know IMemcachedClient.Save will return false if it's unable to write, but the CasResult return value from IMemcachedClient.Cas is rather magic-numberey. From what I've been able to grok, it should return a CasResult with a StatusCode of -1 if it's completely unable to execute the actual check and set operation (the bucket doesn't exist or Couchbase server is down). Is this a correct interpretation?

Thanks,
Peter

Top
  • Login or register to post comments
Mon, 10/01/2012 - 07:06
john
Offline
Joined: 01/05/2012
Groups: None

Hi Peter,

Though the Operation Results API still swallows exceptions, it does wrap them up and allow you to inspect them. See http://www.couchbase.com/wiki/display/couchbase/Couchbase+.NET+Client+Li... for more information.

Please note, I'm working through a couple of improvements that will ensure that the right status codes are bubbling up to the top.

-- jz

Top
  • Login or register to post comments
Mon, 10/01/2012 - 07:33
pdubs_tr
Offline
Joined: 03/20/2012
Groups: None

Thanks, I'll be able to work with that.

Top
  • Login or register to post comments
Thu, 10/18/2012 - 09:52
pdubs10
Offline
Joined: 06/11/2012
Groups: None

Unfortunately IMemcachedClient doesn't contain the "Execute*" methods, so I'm stuck using StatusCode == -1 as my condition, correct?

Top
  • Login or register to post comments
Wed, 10/24/2012 - 17:52
john
Offline
Joined: 01/05/2012
Groups: None

There is another interface - IMemcachedResultsClient - which contains the Execute methods. MemcachedClient implements both of them.

Top
  • Login or register to post comments
  • 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