[JCBC-168] CouchClient.getView always throws an exception Created: 05/Dec/12  Updated: 11/Dec/12  Resolved: 11/Dec/12

Status: Resolved
Project: Couchbase Java Client
Component/s: None
Affects Version/s: 1.1-beta
Fix Version/s: 1.1.0
Security Level: Public

Type: Bug Priority: Blocker
Reporter: Chris Tashjian Assignee: Matt Ingenthron
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   
It would seem that client.getView(String designdocName, String viewName) has stopped working in 1.1-beta. It now throws:

java.lang.RuntimeException: Timed out waiting for operation
at com.couchbase.client.internal.HttpFuture.get(HttpFuture.java:66)
at com.couchbase.client.CouchbaseClient.getView(CouchbaseClient.java:492)

This was working fine in 1.1-dp4.

 Comments   
Comment by Michael Nitschinger [ 06/Dec/12 ]
Hi Chris,

thanks for filing this. There has been a change that makes the ViewTimeout tunable, which I think may be the problem here. All my tests go through without problems, so I think you're using the FactoryBuilder right?

Can you please give me your bootstrap code and all the timeouts you are using? Also, please check your boot logs if it says something about a low view timeout. Thanks!
Comment by Chris Tashjian [ 06/Dec/12 ]
We're using the default ViewTimeout...

CouchbaseConnectionFactoryBuilder builder = new CouchbaseConnectionFactoryBuilder();
builder.setAuthDescriptor(new AuthDescriptor(new String[]{"PLAIN"}, new PlainCallbackHandler(bucketName, password)));
builder.setOpTimeout(opTimeout);
if (failureMode != null) {
    builder.setFailureMode(FailureMode.valueOf(failureMode));
}
CouchbaseClient client = createClient(builder, uris);
Comment by Chris Tashjian [ 06/Dec/12 ]
Ok, I think I was able to get this to work by adding "builder.setViewTimeout(5000);".

At one point I had it set to 3000 and got a timeout exception... however, if you don't explicitly call setViewTimeout, it seems that you get the less informative RuntimeException that I originally filed this for. It might be helpful if the constructor for CouchbaseConnectionFactoryBuilder set some kind of default timeout.
Comment by Matt Ingenthron [ 11/Dec/12 ]
http://review.couchbase.org/#/c/23189/
Comment by Michael Nitschinger [ 11/Dec/12 ]
fixed and pushed to master!
Generated at Thu Sep 18 06:16:33 CDT 2014 using JIRA 5.2.4#845-sha1:c9f4cc41abe72fb236945343a1f485c2c844dac9.