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

Java client 1.1-dp - Returns null values when using CouchbaseConnectionFactoryBuilder

3 replies [Last post]
  • Login or register to post comments
Mon, 08/20/2012 - 19:19
Tim Pedersen
Offline
Joined: 08/16/2012
Groups: None

Hi,

Java client 1.1-dp seems to have a problem using CouchbaseConnectionFactoryBuilder. Client.get() returns null values regardless of whether a key exists or not. Java client 1.0.3 doesn't have the problem.

With 1.1-dp, if I set up a client like so:

URI base = new URI(String.format("http://%s:8091/pools", server));
List baseURIs = new ArrayList();
baseURIs.add(base);
CouchbaseConnectionFactoryBuilder cfb = new CouchbaseConnectionFactoryBuilder();
cfb.setOpTimeout(10000);
cfb.setOpQueueMaxBlockTime(10000);
CouchbaseConnectionFactory cf = cfb.buildCouchbaseConnection(baseURIs, bucket, "", "");
CouchbaseClient client = new CouchbaseClient(cf);

then try to get a key like so:

getFuture = client.asyncGet(key);
value = (String) getFuture.get(); // value is null

the .get() doesn't fail but the returned value is null.

However, if I set up the 1.1-dp client like so, using just CouchbaseConnectionFactory:

URI base = new URI(String.format("http://%s:8091/pools", server));
List baseURIs = new ArrayList();
baseURIs.add(base);
CouchbaseConnectionFactory cf = new CouchbaseConnectionFactory(baseURIs, bucket, "");
CouchbaseClient client = new CouchbaseClient(cf);
getFuture = client.asyncGet(key);
value = (String) getFuture.get(); // value is not null and contains the document for the key

I want to use CouchbaseConnectionFactoryBuilder because I'm doing a bulk import of millions of documents and I need the timeout/blocking behaviour to prevent swamping the client.

Java client 1.0.3 works correctly - using CouchbaseConnectionFactoryBuilder to build connection factories and clients results in the correct behaviour.

Is there something I'm doing wrong - or is this a bug? If it is a bug I'll lodge an issue in Jira.

Cheers,

Tim

__________________

Tim Pedersen

Top
  • Login or register to post comments
Mon, 08/20/2012 - 19:20
ingenthr
Offline
Joined: 03/16/2010
Groups:

Hi Tim,

I replied already on the other side, but this is a known issue, solved in 1.1dp2 which we hope to have released in the next couple of days.

Sorry for the hassle,

Matt

Top
  • Login or register to post comments
Mon, 08/20/2012 - 20:13
Tim Pedersen
Offline
Joined: 08/16/2012
Groups: None

Thanks Matt,

I just finished raising a couple or Jiras ( JCBC-102 and JCBC-103) relating to this, probably while you were writing your reply! Please close them if the issues have already been fixed.

Cheers,

Tim

__________________

Tim Pedersen

Top
  • Login or register to post comments
Wed, 08/22/2012 - 00:06
ingenthr
Offline
Joined: 03/16/2010
Groups:

Hi Tim,

We've just posted 1.1-dp2 to the site. We'll have a look through those bugs and close/update as appropriate. I think based on what I've seen, we can probably close most of them.

Thanks,

Matt

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