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

DefaultConfigFactory attempts to create VBucket with master == -1

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: 1.1dp
    • Fix Version/s: 1.1-beta
    • Component/s: Core
    • Security Level: Public
    • Labels:
      None
    • Environment:
      all java

      Description

      Caused by: java.lang.ArrayIndexOutOfBoundsException: -1
      at java.util.ArrayList.get(ArrayList.java:324)
      at com.couchbase.client.vbucket.config.DefaultConfig.getServer(DefaultConfig.java:81)
      at com.couchbase.client.vbucket.VBucketNodeLocator.getPrimary(VBucketNodeLocator.java:74)
      at com.couchbase.client.CouchbaseConnection.addOperation(CouchbaseConnection.java:140)
      at net.spy.memcached.MemcachedConnection.enqueueOperation(MemcachedConnection.java:639)
      at net.spy.memcached.MemcachedClient.asyncStore(MemcachedClient.java:296)
      at net.spy.memcached.MemcachedClient.set(MemcachedClient.java:727)
      at net.spy.memcached.MemcachedClient.set(MemcachedClient.java:125)
      at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)

      Possible steps to reproduce:
      1) populate bucket from load file
      2) delete bucket
      3) create new bucket with same name
      4) repopulate bucket with same keys, same order, slightly different values

      The -1 value looks like it is being set when the VBucket object is created. Would it make sense to check for illegal arguments in the constructor and make the object immutable, i.e. no setMaster?

        Issue Links

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

          Activity

          Hide
          thanhbv thanhbv added a comment -

          Affects Version: 1.0.2

          Show
          thanhbv thanhbv added a comment - Affects Version: 1.0.2
          Hide
          daschl Michael Nitschinger added a comment -

          I'm pretty sure these two issues strongly correlate.

          Show
          daschl Michael Nitschinger added a comment - I'm pretty sure these two issues strongly correlate.
          Hide
          daschl Michael Nitschinger added a comment -

          This issue will be tracked in JCBC-123.

          Show
          daschl Michael Nitschinger added a comment - This issue will be tracked in JCBC-123 .

            People

            • Assignee:
              daschl Michael Nitschinger
              Reporter:
              SteveC Steven Cooke
            • Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Gerrit Reviews

                There are no open Gerrit changes