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

IndexDao patch function is not atomic

    XMLWordPrintableJSON

Details

    • Bug
    • Status: To Do
    • Major
    • Resolution: Unresolved
    • None
    • None
    • 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

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

            Dates

              Created:
              Updated: