Uploaded image for project: 'Java DCP Client'
  1. Java DCP Client
  2. JDCP-116

BucketConfigHelper.getHostedPartitions() fails when node hosts no partitions

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.21.0
    • Labels:
      None
    • Story Points:
      1

      Description

      If the bucket config has an entry for a node running the k/v service, but that node is not hosting any partitions, the following exception is observed and the DCP connection is repeatedly closed and reopened.

      [2019-02-07 08:58:52,901] ERROR Failed to reconfigure persistence poller; closing channel. (com.couchbase.client.dcp.buffer.PersistencePollingHandler:195)
      java.lang.IllegalArgumentException: Node 0 does not exist
              at com.couchbase.client.dcp.buffer.NodeToPartitionMultimap.get(NodeToPartitionMultimap.java:67)
              at com.couchbase.client.dcp.buffer.BucketConfigHelper.getHostedPartitions(BucketConfigHelper.java:52)
              at com.couchbase.client.dcp.buffer.PersistencePollingHandler.reconfigure(PersistencePollingHandler.java:104)
              at com.couchbase.client.dcp.buffer.PersistencePollingHandler.access$000(PersistencePollingHandler.java:38)
              at com.couchbase.client.dcp.buffer.PersistencePollingHandler$1.call(PersistencePollingHandler.java:81)
              at com.couchbase.client.dcp.buffer.PersistencePollingHandler$1.call(PersistencePollingHandler.java:78)
              at rx.internal.util.ActionSubscriber.onNext(ActionSubscriber.java:39)
              at rx.observers.SafeSubscriber.onNext(SafeSubscriber.java:134)
              at rx.internal.operators.OperatorObserveOn$ObserveOnSubscriber.call(OperatorObserveOn.java:224)
              at rx.internal.schedulers.ScheduledAction.run(ScheduledAction.java:55)
              at rx.internal.schedulers.ExecutorScheduler$ExecutorSchedulerWorker.run(ExecutorScheduler.java:107)
              at com.couchbase.client.deps.io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:399)
              at com.couchbase.client.deps.io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:464)
              at com.couchbase.client.deps.io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:131)
              at com.couchbase.client.deps.io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
              at java.base/java.lang.Thread.run(Thread.java:834)
      

        Attachments

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

          Activity

          Hide
          ingenthr Matt Ingenthron added a comment -

          Note on this one, every node runs the KV service but some do not host any buckets. For example, a 2i or query node might run the KV service which also does some other work like auditing. The DCP client shouldn't connect to these nodes.

          Show
          ingenthr Matt Ingenthron added a comment - Note on this one, every node runs the KV service but some do not host any buckets. For example, a 2i or query node might run the KV service which also does some other work like auditing. The DCP client shouldn't connect to these nodes.
          Hide
          david.nault David Nault added a comment -

          Note to self: Check the connection logic in `Conductor.reconfigure()` to make sure the client is connecting to the appropriate nodes as Matt mentioned.

          Show
          david.nault David Nault added a comment - Note to self: Check the connection logic in `Conductor.reconfigure()` to make sure the client is connecting to the appropriate nodes as Matt mentioned.

            People

            Assignee:
            david.nault David Nault
            Reporter:
            david.nault David Nault
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes

                  PagerDuty