Couchbase
  • Why NoSQL?
  • Couchbase Server
  • Download
  • Resources
  • Careers
Home | Forums | Membase | Membase Server 1.7.x

last character of the key prefix string ignored

4 replies [Last post]
  • Login or register to post comments
Mon, 06/13/2011 - 16:15
chatty
Offline
Joined: 11/17/2010
Groups: None

I'm seeing this with membase-server 1.7.
https://bugs.launchpad.net/libmemcached/+bug/776354
tested OK with patched version of libmemcached 0.49

To save me downloading the source, is this scheduled to be in 1.71?

Chatty

Top
  • Login or register to post comments
Mon, 06/13/2011 - 16:49
chatty
Offline
Joined: 11/17/2010
Groups: None

actually hold that, let me make absolutely sure...(checked source and it looks nothing like libmemcached!)
will write a test prog..

Top
  • Login or register to post comments
Mon, 06/13/2011 - 18:27
chatty
Offline
Joined: 11/17/2010
Groups: None

OK, nevermind, false alarm sort of... but someone else will hit this so...
This is a bug in libmemcached that you will see if you're using version 0.49 (centos 5.5 et all) and are using prefixes.
Here's my test prog:

<?php
$memcache = new Memcached();
$key_prep='ztest::';

$memcache->setOption(Memcached::OPT_PREFIX_KEY, $key_prep);
$memcache->setOption(Memcached::OPT_BINARY_PROTOCOL, FALSE);
$memcache->setOption(Memcached::OPT_COMPRESSION, TRUE);
$memcache->addServer('127.0.0.1',11211);
$obj=12;
$memcache->add('ztest1', $obj, 0);
echo "Prefix : ", $memcache->getOption(Memcached::OPT_PREFIX_KEY), "\n";
?>

Run this on a client machine using current versions of membase/moxi and php-pecl-memcached and you'll be 1 char short on your prefix.
It's not moxi or membase, it's libmemcached. Fix will be in 0.5 or you can just get the source for .49 and recompile after changing libmemcached/array.c:63 to array->size= str_length;

Maybe a mod could move this thread to the moxi forum.

Chatty

Top
  • Login or register to post comments
Tue, 06/14/2011 - 07:23
TimSmith
Offline
Joined: 02/09/2011
Groups:

Chatty,

To answer your question about when the fix will be included in the Membase binaries, we do build from libmembase trunk when doing a Membase release. So yes, the fix should be in 1.7.1.

Tim

Top
  • Login or register to post comments
Tue, 06/14/2011 - 17:16
perry
Offline
Joined: 10/11/2010
Groups:

Also to clarify, the bug is in the client library, not anything that Couchbase actually provides. The fix is already available as per the thread above.

__________________

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 Couchbase: http://www.couchbase.com/products-and-services/overview
Call or email "sales -at- couchbase-dot- com" today!

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