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

PHP Ext: "get" after "prepend" or "append" only returns last value prepended/appended

1 reply [Last post]
  • Login or register to post comments
Tue, 03/20/2012 - 18:39
mssteuer
Offline
Joined: 03/20/2012
Groups: None

I have a very weird problem. Using the current PHP Extension (couchbase.so), I'm prepending (or appending) values to a key. When I subsequently "get" that key, the extension only returns the last prepended/appended value to me, vs. the entire key value. If I however telnet to the couchbase server and "get" that way, I can verify that the full value is there, with all the appendices...

console:

get Test6
VALUE Test6 1 41
1407971623,1474693532,101417852,331145725
END
get Test6
VALUE Test6 1 41
1407971623,1474693532,101417852,331145725
END
get Test6
VALUE Test6 1 230
1582106666,1487511791,1969168774,1956718300,643137240,1558088382,719325115,1737977192,922644553,1697835667,363523321,175374370,2004964137,92468065,1381011077,1588161021,1237581990,31693720,1407971623,1474693532,101417852,331145725
END

PHP:

if(!$cb->get("Test6")) {
	$cb->add("Test6",rand());
}
$cb->prepend("Test6", rand().",");
echo "<pre>";
$vars = $cb->get("Test6");
print_r($vars);

where $cb is a properly instantiated Couchbase instance (using couchbase.so)

$vars after every time the above is executed only contains the last prepended value...

Top
  • Login or register to post comments
Wed, 03/21/2012 - 09:02
mssteuer
Offline
Joined: 03/20/2012
Groups: None

The issue seems to be limited to when an integer value is set. When setting a string and prepending more strings to it, the issue doesn't occur. (which is why the tests packaged with couchbase.so are passing, they're only testing strings...)

Seems like a legit bug in couchbase.so

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