Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-50745

[FTS] Indexing is too slow, causing Integration tests to fail

    XMLWordPrintable

Details

    • Bug
    • Resolution: Incomplete
    • Critical
    • None
    • 7.0.3
    • fts
    • None
    • Docker
      Couchbase 7.0.3
    • Untriaged
    • 1
    • Unknown

    Description

      Context:

      I'm maintaining an Open Source project: JHipster it helps customers to start fast by generating a complete application (Java backend, Angular/Vue/React frontend), with their entities, and a complete set of unit and integration tests. It's compatible with multiple databases, including Couchbase, the part that I'm maintaining.

      JHipster uses Testcontainers in order to run integration tests.

      Issue:

      All the integration tests, including Search tests was passing correctly with version 7.0.0. But, beginning from 7.0.1, Search tests are failing. See https://github.com/jhipster/generator-jhipster/pull/17500#issuecomment-1006403276

      JHipster uses N1QL Search Function using Spring Data Couchbase:

      @Query("#{#n1ql.selectEntity} WHERE #{#n1ql.filter} AND SEARCH(#{#n1ql.bucket}, #{[0]}) #{[1]}")
      List<Place> search(String queryString, Pageable pageable);
      

      The integration tests are using a helper function to wait until the document was indexed:

      @Test
      void searchPlace() throws Exception {
         ...
         // Wait for the place to be indexed
         TestUtil.retryUntilNotEmpty(() -> placeRepository.search("id:" + place.getId()));
         ...
      }
       
      public static <T> void retryUntilNotEmpty(Callable<Iterable<T>> iterableCallable) {
              Mono
                  .defer(() ->
                      Mono
                          .fromCallable(iterableCallable)
                          .flatMapIterable(Function.identity())
                          .next()
                          .switchIfEmpty(Mono.error(new NoSuchElementException()))
                  )
                  .retry()
                  .timeout(Duration.ofSeconds(5))
                  .block();
      }
      

      I tried to increase the timeout up to 10 min, still nothing. So there maybe so regression beginning from version 7.0.1.

      Attachments

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

        Activity

          People

            abhinav Abhi Dangeti
            tayeb.chlyah Tayeb Chlyah
            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