Solr
  1. Solr
  2. SOLR-2536

add reloadCache feature to ExternalFileField

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.3, 1.4.1, 3.1
    • Fix Version/s: 3.2, 4.0-ALPHA
    • Component/s: search
    • Labels:
      None

      Description

      spin off from SOLR-1607. To fix ExternalFileField bug described SOLR-1607, I'd propose introducing reloadCache feature over using proper key other than IndexReader.

      1. SOLR-2536.patch
        6 kB
        Koji Sekiguchi
      2. SOLR-2536.patch
        3 kB
        Koji Sekiguchi

        Issue Links

          Activity

          Hide
          Koji Sekiguchi added a comment -

          Patch attached. I introduced ReloadCacheRequestHandler in this patch. It does reset readerCache, then commit. It works nicely.

          Show
          Koji Sekiguchi added a comment - Patch attached. I introduced ReloadCacheRequestHandler in this patch. It does reset readerCache, then commit. It works nicely.
          Hide
          Koji Sekiguchi added a comment -

          2nd Patch. I changed test case to use the reloadCache feature.

          Before patch, the test must add dummy doc before commit to visible the external file change, I patched like this:

          -    assertU(adoc("id", "10000")); // will get same reader if no index change
          -    assertU(commit());
          +    assertU(h.query("/reloadCache",lrf.makeRequest("","")));
          

          I think this is ready to commit.

          Show
          Koji Sekiguchi added a comment - 2nd Patch. I changed test case to use the reloadCache feature. Before patch, the test must add dummy doc before commit to visible the external file change, I patched like this: - assertU(adoc( "id" , "10000" )); // will get same reader if no index change - assertU(commit()); + assertU(h.query( "/reloadCache" ,lrf.makeRequest( ""," "))); I think this is ready to commit.
          Hide
          Koji Sekiguchi added a comment -

          trunk: Committed revision 1126487.
          3x: Committed revision 1126492.

          Show
          Koji Sekiguchi added a comment - trunk: Committed revision 1126487. 3x: Committed revision 1126492.
          Hide
          Yonik Seeley added a comment -

          If the filterCache or queryCache contains an entry that uses FileFloatSource, we'll still return stale results, right?
          Perhaps changing FileFloatSource to include a version (perhaps obtained from SolrIndexSearcher or SolrCore and incremented by this new handler?

          Show
          Yonik Seeley added a comment - If the filterCache or queryCache contains an entry that uses FileFloatSource, we'll still return stale results, right? Perhaps changing FileFloatSource to include a version (perhaps obtained from SolrIndexSearcher or SolrCore and incremented by this new handler?
          Hide
          Koji Sekiguchi added a comment -

          If the filterCache or queryCache contains an entry that uses FileFloatSource, we'll still return stale results, right?

          I may be missing something, but is it true?
          (I named the handler "ReloadCache-", but I thought it was not appropriate after commit. The handler just reset readerCache then issue commit. So it doesn't reload in reality...)

          Show
          Koji Sekiguchi added a comment - If the filterCache or queryCache contains an entry that uses FileFloatSource, we'll still return stale results, right? I may be missing something, but is it true? (I named the handler "ReloadCache-", but I thought it was not appropriate after commit. The handler just reset readerCache then issue commit. So it doesn't reload in reality...)
          Hide
          Koji Sekiguchi added a comment -

          Hmm, the existing searcher can be used between resetCache and commit in this handler.

          Show
          Koji Sekiguchi added a comment - Hmm, the existing searcher can be used between resetCache and commit in this handler.
          Hide
          Robert Muir added a comment -

          Bulk close for 3.2

          Show
          Robert Muir added a comment - Bulk close for 3.2

            People

            • Assignee:
              Koji Sekiguchi
              Reporter:
              Koji Sekiguchi
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development