Uploaded image for project: 'Java Couchbase JVM Core'
  1. Java Couchbase JVM Core
  2. JVMCBC-42

View query will lock up after first attempt

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Critical
    • 1.0.1
    • 1.0-beta2, 1.0.0
    • Core
    • JAVA 1.8
      MAC 10.9.4

    Description

      If you try to run a simple query view twice at beta, you will notice that only #1 attempt will work, the second will wait indefinitely.

      In beta-2, the query won't work at all, it will block right away!!

      I've tested with async and sync mode in both releases.

      Could you please take a look on that?
      Thanks.

      @Test
      public void testAsync() throws Exception {
      CouchbaseCluster cluster = CouchbaseCluster.create(DefaultCouchbaseEnvironment.builder().build());
      Bucket bucket = cluster.openBucket("default");

      CountDownLatch latch = new CountDownLatch(10);

      for (int i = 0; i < 10; i++) {
      bucket
      .async()
      .query(ViewQuery.from("test", "test"))
      .doOnNext(result -> {
      if (!result.success())

      { System.err.println(result.error()); }

      })
      .flatMap(AsyncViewResult::rows)
      .subscribe(row ->

      { System.out.println(row.id()); latch.countDown(); }

      );
      }

      latch.await();
      }

      Attachments

        Issue Links

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

          Activity

            People

              avsej Sergey Avseyev
              casmeiron casmeiron
              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