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

Issue with Observe API Persist.TWO and 1 dead node: Time Out when doing set operation

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Critical
    • 1.1-beta
    • 1.1-dp4
    • Core
    • Security Level: Public
    • None
    • 2 nodes cluster on couchbase-server-community_x86_2.0.0-1947-rel
        1 node on Ubuntu (VM)
        1 node on OS X

      Bucket configure with 1 replica

    Description

      I have a very simple Java program that connect to the 2 nodes and do a set with the following code:

      1. So I try to connect to multiple nodes

                  List<URI> couchbaseServerUris = new ArrayList<URI>();
                  couchbaseServerUris.add( new URI("http://192.168.0.108:8091/pools") );
                  couchbaseServerUris.add( new URI("http://192.168.0.104:8091/pools") );
                  CouchbaseClient client = new CouchbaseClient( couchbaseServerUris , "default" , "" );
      

      2. Then I call the set operation

       
              OperationFuture<Boolean> stored = client.set( "my-dummy-key",0, "{\"name\" : \"foo\", \"title\" : \"bar-test\"}", PersistTo.TWO);
      


      So everything is working as expected when the 2 nodes are up.

      When I kill 1 node (for example : disconnecting, or stopping, or pausing the Ubuntu VM) I have the following behavior:

      When I execute this program:
      1- I have an exception saying that 1 node is down : Expected behavior (even if we could avoid a long stack trace)

      2012-11-18 08:14:55.830 WARN com.couchbase.client.vbucket.ConfigurationProviderHTTP:  Connection problems with URI http://192.168.0.108:8091/pools ...skipping
      java.net.ConnectException: Host is down
      

      2- When I do the set the program is stopped/blocked until it reaches a network timeout
      2012-11-18 08:20:13.462 INFO com.couchbase.client.CouchbaseConnection: Shut down Couchbase client

      Error while storing : Observe Timeout - Polled Unsuccessfully for at least 40 seconds.
      2012-11-18 08:20:13.466 INFO 		 done : true
      		 done : {OperationStatus success=false:  Observe Timeout - Polled Unsuccessfully for at least 40 seconds.}
      com.couchbase.client.ViewNode:  Couchbase I/O reactor terminated
      2012-11-18 08:20:13.467 INFO com.couchbase.client.ViewNode:  Couchbase I/O reactor terminated
      

      Note that it is only happening with PersistTo.TWO
      if I use PersistTo.MASTER or PersistTo.ONE : the program is executed with no error and no stop
      if I use PersistTo.THREE ( or more) : the program is executed, no stop with the expected observe message : ( Error while storing : Requested persistence to 3 node(s), but only 2 are available.
      )

      Attachments

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

        Activity

          People

            daschl Michael Nitschinger
            tgrall Tug Grall (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty