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

Documentation of StatusCode

1 reply [Last post]
  • Login or register to post comments
Fri, 03/23/2012 - 18:02
TomMayer
Offline
Joined: 03/14/2012
Groups: None

Hi there,

using C# Couchbase client; the CasResult method exposes an property "StatusCode". Is there any documentation about the meaning of these integer values?

I found in the documentation that there are some states like "LOCK_ERROR" or "EXISTS". Do you know where i ll find a list of integers and their correspondending meanings?

var CasResult = await dbclient.CasAsync<string>(Enyim.Caching.Memcached.StoreMode.Set,
                document.GetId(), document.ToJSON(), cas);
 
CasResult.StatusCode   // <--- ?? 

I plan to use StatusCode to inform the caller... i.e. "operation abort, cause newer version exists.." or "network error, request queued up for retry..."

Thanks for your reply in advance.

Tom

Top
  • Login or register to post comments
Sun, 03/25/2012 - 06:35
TomMayer
Offline
Joined: 03/14/2012
Groups: None

Issue closed.

Hi,

if someone is interessted in the status codes.. here there are..

found at binary protocol specification of memchached:
http://code.google.com/p/memcached/wiki/BinaryProtocolRevamped#Response_...

Response Status

Possible values of this two-byte field:
0x0000 No error
0x0001 Key not found
0x0002 Key exists
0x0003 Value too large
0x0004 Invalid arguments
0x0005 Item not stored
0x0006 Incr/Decr on non-numeric value.
0x0007 The vbucket belongs to another server
0x0008 Authentication error
0x0009 Authentication continue
0x0081 Unknown command
0x0082 Out of memory
0x0083 Not supported
0x0084 Internal error
0x0085 Busy
0x0086 Temporary failure

I saw in the DotNet client implementation, that the api handels 0x0007 itself. For now, i think a retry-logic for an failed operation is only nessesairy in few cases (StatusCode = 85, 84, 86) and maybe for 9? Can somebody of the couchbase team commit that?

Last question here.. some CouchbaseClient methods does not return any status information directly. f.e. "CouchbaseClient.Get". Is there an aditional api call to get the latest status code or message (this might be a bit dangerous in an asynchron world)? Or would you recommend to use only the cas-versions of Get/Store?

Thanks and happy coding!

Tom

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