last character of the key prefix string ignored
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
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
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
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.
actually hold that, let me make absolutely sure...(checked source and it looks nothing like libmemcached!)
will write a test prog..