Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-7952

Change DeltaImport from HashSet to LinkedHashSet.

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Won't Fix
    • 5.2.1
    • None

    Description

      This is only a minor modification which on some cases might be useful for certain custom DataSources or ImportHandlers.

      The way my imports work is by fetching on batches, So I need to store those batches on a disk cache for a certain time as they are not required on the mean time.

      And also use some lazy loading as my batches are not initialized by my custom iterators until the time they are iterated for the first time,

      My issue comes from that the order in which I pass the ids of my documents to the ImporHandler during the "FIND_DELTA" step is not the same order they are tried to be fetch during the DELTA_DUMP step. It causes my batches to be initialized when only one of them could be done at a time.

      What I would like is to simply change the HashSet used on the "collectDelta" method to a LinkedHashSet. This would help as we would obtain a predictable order of documents.

      This may be a very specific case but the change is simple and shouldn't impact on anything.

      The second option would be to create a "deltaImportQuery" like that would work like:" select * from table where last_modified > '${dih.last_index_time}'".

      I can issue the patch for this.

      Attachments

        1. SOLR-7952.patch
          1 kB
          Mikhail Khludnev

        Issue Links

          Activity

            People

              Unassigned Unassigned
              Altaflux Pablo Lozano
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: