Uploaded image for project: 'Metron'
  1. Metron
  2. METRON-1535

IndexDao patch function is not atomic

    Details

    • Type: Bug
    • Status: To Do
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
      None

      Description

      Our Index and Elasticsearch DAO patch operations are not atomic.  Currently a patch involves looking up the current version of a document, patching it, then reindexing the whole document in separate steps.  This could lead to a race condition that causes incorrect or corrupt data.

      This pattern also exists in a couple different places in the ElasticsearchMetaAlertDao including here.

      Elasticsearch offers an Update API that may be more appropriate in these cases.  I don't know if it works on nested documents so that would need to be tested.

      Looking up the whole doc as part of an update is also causing this bug in the SolrMetaAlertDao feature because Solr returns extra fields that can't be directly reindexed.  There is also an Atomic Update in Solr that is similar to the Elasticsearch Update API.  

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              rmerriman Ryan Merriman
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: