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

N1QL query returning more than 2048 bytes results in IndexOutOfBoundsException

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Major
    • 2.1.0
    • 2.0.1
    • Infrastructure
    • Security Level: Public
    • None

    Description

      Per the user:

      Every time I request an object that is larger than 2048 bytes through bucket.query, I get the following exception:
      WARN : com.couchbase.client.core.endpoint.AbstractGenericHandler - [/127.0.0.1:8093][QueryEndpoint]: Caught unknown exception: java.lang.IndexOutOfBoundsException: index: 2048 (expected: range(0, 2048))
      com.couchbase.client.deps.io.netty.handler.codec.DecoderException: java.lang.IndexOutOfBoundsException: index: 2048 (expected: range(0, 2048))
      at com.couchbase.client.deps.io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:99)

      I dabbled with Netty for a bit and I think you can set a ByteBuf size in the MessageToMessageDecoder. I think it has been set to 2048 and that’s bombing with a larger object. If I limit the amount of columns returned, bucket.query works like a charm.

      The below code snippet exhibits the behavior:

      // Connect Sync
      Cluster cluster = CouchbaseCluster.create(env, hosts);
      Bucket bucket = cluster.openBucket(bucketName, password);

      QueryResult queryResult = bucket.query("SELECT pid, pgid, styleNumber, styleName, colorCode, bestFor FROM retail WHERE qanda IS MISSING");

      Attachments

        Issue Links

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

          Activity

            People

              daschl Michael Nitschinger
              dproctor Dean Proctor (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty