Couchbase
  • Why NoSQL?
  • Couchbase Server
  • Download
  • Resources
  • Careers
Home | Forums | Couchbase | Product Feature Requests

support infinite locks using getl

1 reply [Last post]
  • Login or register to post comments
Wed, 01/19/2011 - 04:21
sublimino
Offline
Joined: 01/19/2011
Groups: None

Hello! I would like to implement PHP session storage with membase over the memcache extension, but have a requirement that lock expiry is greater than 29 seconds (sadly many PHP applications require long session locks in lieu of a queue service). 

1. Are infinite timeouts practical? I'd like a lock to be released when the client's connection drops (in case of application crashes) - does the client keep an open connection for the duration of the lock?

2. If infinite timeouts are impractical could the maximum expiry time be increased to a greater value, perhaps ~200s, when it's explicitly set? I realise this could introduce backwards incompatibilities, perhaps a different method/parameter position for setting this timeout could be used?

Top
  • Login or register to post comments
Tue, 05/10/2011 - 11:24
mikew
Offline
Joined: 03/14/2011
Groups:

1. Each lock doesn't know about the connection that was used to create it. If you had an infinite lock on a key and the client that locked the key went down then the keys would still be locked "infinitely". I put infinitely in quotes because Membase has the functionality to unlock locked keys, but the client would have to do this. So basically if you had an infinite lock you would just have to unlock it before it could ever be used again.

2. If we hear about more use cases for infinite locks we might implement them in the future. For now though we have added functionality to Membase 1.7 to allow the user to specify the default and max timeout for getl on the command line. If you want to change them you will have to replace the memcached executable with a custom shell script that provides the default memcached parameters used in Membase as well as the extra parameters for changing the default values of getl.

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