Uploaded image for project: 'Couchbase Java Client'
  1. Couchbase Java Client
  2. JCBC-168

CouchClient.getView always throws an exception

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 1.1-beta
    • Fix Version/s: 1.1.0
    • Component/s: None
    • Security Level: Public
    • Labels:
      None

      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.

      No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

        Hide
        daschl Michael Nitschinger added a comment -

        fixed and pushed to master!

        Show
        daschl Michael Nitschinger added a comment - fixed and pushed to master!
        Show
        ingenthr Matt Ingenthron added a comment - http://review.couchbase.org/#/c/23189/
        Hide
        ctash_jt Chris Tashjian added a comment -

        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.

        Show
        ctash_jt Chris Tashjian added a comment - 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.
        Hide
        ctash_jt Chris Tashjian added a comment -

        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);

        Show
        ctash_jt Chris Tashjian added a comment - 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);
        Hide
        daschl Michael Nitschinger added a comment -

        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!

        Show
        daschl Michael Nitschinger added a comment - 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!

          People

          • Assignee:
            ingenthr Matt Ingenthron
            Reporter:
            ctash_jt Chris Tashjian
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Gerrit Reviews

              There are no open Gerrit changes