Uploaded image for project: 'Atlas'
  1. Atlas
  2. ATLAS-4554

Elasticsearch: Add Elasticsearch backend monitor && Fix some bugs when using atlas with elasticsearch backend

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.0.0
    • 3.0.0, 2.3.0
    • atlas-core, atlas-intg
    • None
    • Patch

    Description

      When using elasticsearch as the background index, the status of solr is displayed as unhealthy.

      if (!isHealthy && (prevSolrHealthCheckTime == 0 || currentTime - prevSolrHealthCheckTime > SOLR_STATUS_LOG_FREQUENCY_MS)) {
          LOG.info("Solr Health: Unhealthy!"); 

      Looking at the code, it is found that atlas currently only has the health monitoring of the solr index, so the relevant monitoring function about elasticsearch has been added.

      if (backendSolr.equals(backend) && isSolrHealthy()) {
          isHealthy = true;
          LOG.info("Backend Solr Health: Healthy!");
      }
      else if (backendElasticSearch.equals(backend) && isElasticsearchHealthy()) {
          isHealthy = true;
          LOG.info("Backend ElasticSearch Health: Healthy!");
      } 

      By the way, ElasticSearch7index support was added, extracted from the org.janusgraph.diskstorage.es code, and adjusted with method to new client instance

      graphdb/janus/src/main/java/org/janusgraph/diskstorage/es/ElasticSearch7Index.java 

      At the same time, in the process of use, there is also a problem that cannot be used due to log.info problems, and it has been fixed here

      LOG.info("Setting " + SOLR_WAIT_SEARCHER_CONF + " = " + getBoolean(SOLR_WAIT_SEARCHER_CONF)); 

      Attachments

        Issue Links

          Activity

            People

              frankyu8 Xingyu Zha
              frankyu8 Xingyu Zha
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m