Uploaded image for project: 'Jackrabbit Oak'
  1. Jackrabbit Oak
  2. OAK-9862

Some tests in oak-search are not cleaning up Elastic Search indexes after the test

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 1.46.0
    • indexing
    • None

    Description

      Several of the Elastic tests that are based on the common tests in oak-search are not cleaning up the indexes they create. They should clean up the indexes.

      When the tests are run with a disposable Elastic container started by the tests, this is not much of an issue because these will all be cleaned at the end of the test run when the container is terminated. But when running with an external Elastic instance, the indexes accumulate and eventually have to be deleted manually.

      Running with an external instance is convenient for development, as it speeds up the tests significantly (no waiting for ES container to start) and it allows to inspect the indexes directly using Kibana. So having to periodically delete all these stale indexes left by the tests are a bit of a nuisance.

      And even when running with a disposable container, leaving indexes from previous tests is not a good practice and can cause issues (maybe it can lead to slowdowns if there are too many indexes).

      As far as I checked, all the *CommonTests in package org.apache.jackrabbit.oak.plugins.index do not delete the Elastic indexes.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              nuno.santos Nuno Santos
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: