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

ArrayOutOfBounds exception during failover

    Details

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

      Description

      While running a sequence of getsAsync operations, the entry point/bootstrap node is failed over. The output follows

      Exception in thread "SDK Handle-8" java.lang.ArrayIndexOutOfBoundsException: -1
      at java.util.ArrayList.elementData(ArrayList.java:338)
      at java.util.ArrayList.get(ArrayList.java:351)
      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:144)
      at net.spy.memcached.MemcachedConnection.enqueueOperation(MemcachedConnection.java:639)
      at net.spy.memcached.MemcachedClient.asyncGets(MemcachedClient.java:888)
      at net.spy.memcached.MemcachedClient.asyncGets(MemcachedClient.java:902)
      at com.couchbase.sdkd.cbclient.GetCommandContext.doOneCommand(GetCommandContext.java:60)
      at com.couchbase.sdkd.cbclient.CommandContext.execute(CommandContext.java:266)
      at com.couchbase.sdkd.server.SdkServer.executeCommand(SdkServer.java:114)
      at com.couchbase.sdkd.server.SdkServer.handleRequest(SdkServer.java:133)
      at com.couchbase.sdkd.server.SdkServer.run(SdkServer.java:187)

        Issue Links

        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 -

          An exception is now raised, because a vbucket master of -1 means that no server is able to respond for the given key. This is a strong indication of data loss. This could be the case because no replica was defined and a node was failed over or more nodes have been failed over than replicas defined.

          Either way, the client itself has no chance of dealing with the situation and therefore populates a controlled exception up to the caller.

          The fix has been pushed to master and will be available in dp5.

          Show
          daschl Michael Nitschinger added a comment - An exception is now raised, because a vbucket master of -1 means that no server is able to respond for the given key. This is a strong indication of data loss. This could be the case because no replica was defined and a node was failed over or more nodes have been failed over than replicas defined. Either way, the client itself has no chance of dealing with the situation and therefore populates a controlled exception up to the caller. The fix has been pushed to master and will be available in dp5.
          Hide
          daschl Michael Nitschinger added a comment -
          Show
          daschl Michael Nitschinger added a comment - Tracked here: http://review.couchbase.org/#/c/22352/
          Hide
          daschl Michael Nitschinger added a comment -

          Hey Mark,

          can you check if this also happens against the dp3 release? I saw that the sdkd-java builds against the stable release.

          Thanks!

          Show
          daschl Michael Nitschinger added a comment - Hey Mark, can you check if this also happens against the dp3 release? I saw that the sdkd-java builds against the stable release. Thanks!
          Hide
          ingenthr Matt Ingenthron added a comment -

          This may fall into rewriting the configuration handling. I'll discuss this more with Michael as needed.

          Show
          ingenthr Matt Ingenthron added a comment - This may fall into rewriting the configuration handling. I'll discuss this more with Michael as needed.

            People

            • Assignee:
              daschl Michael Nitschinger
              Reporter:
              mnunberg Mark Nunberg
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Gerrit Reviews

                There are no open Gerrit changes