Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance searchable snapshots to enable a read-only view of older snapshots #5429

Merged
merged 10 commits into from
Jan 5, 2023

Commits on Jan 4, 2023

  1. Enhance searchable snapshots to enable a read-only view of older snap…

    …shots
    
    This change removes the guardrails around N-1 backward compatibility and uses Lucene's "expert" APIs to read snapshots (Lucene segments) older than N-1 on a best-effort basis. The functionality is gated by an additional feature flag, separate from the searchable snapshots flag. Note that the Lucene integration is rather inefficient because the necessary "expert" Lucene APIs are still package-private.
    
    Signed-off-by: Kartik Ganesh <gkart@amazon.com>
    kartg committed Jan 4, 2023
    Configuration menu
    Copy the full SHA
    5d4acf6 View commit details
    Browse the repository at this point in the history
  2. Added some unit tests

    This change also includes a test index ZIP file for the unit tests. The change also introduces a bug fix in the readAnySegmentsInfo method to close the reader before returning the SegmentInfos object - this avoids dangling/open file handles.
    
    Signed-off-by: Kartik Ganesh <gkart@amazon.com>
    kartg committed Jan 4, 2023
    Configuration menu
    Copy the full SHA
    f4f1648 View commit details
    Browse the repository at this point in the history
  3. Incorporating PR feedback

    Signed-off-by: Kartik Ganesh <gkart@amazon.com>
    kartg committed Jan 4, 2023
    Configuration menu
    Copy the full SHA
    d85174f View commit details
    Browse the repository at this point in the history
  4. Incorporate PR comments from andrross

    Signed-off-by: Kartik Ganesh <gkart@amazon.com>
    kartg committed Jan 4, 2023
    Configuration menu
    Copy the full SHA
    e5d8880 View commit details
    Browse the repository at this point in the history
  5. Remove use of IndexSetting for minimum version for snapshots backward…

    …s compatibility
    
    Signed-off-by: Kartik Ganesh <gkart@amazon.com>
    kartg committed Jan 4, 2023
    Configuration menu
    Copy the full SHA
    a0eea5d View commit details
    Browse the repository at this point in the history
  6. Moved ES 6.3.0 test data to a subdirectory

    This change also includes an update to the file name to clarify that it is an ES index, and changing the associated markdown file name to just README.md. All tests that reference this ZIP file have corresponding changes to the path they reference.
    
    Signed-off-by: Kartik Ganesh <gkart@amazon.com>
    kartg committed Jan 4, 2023
    Configuration menu
    Copy the full SHA
    440b066 View commit details
    Browse the repository at this point in the history
  7. Update unit tests to use try-with-resources

    Signed-off-by: Kartik Ganesh <gkart@amazon.com>
    kartg committed Jan 4, 2023
    Configuration menu
    Copy the full SHA
    73a1429 View commit details
    Browse the repository at this point in the history
  8. Added FeatureFlagSetter helper class

    Also refactored unit test classes to use the helper class.
    
    Signed-off-by: Kartik Ganesh <gkart@amazon.com>
    kartg committed Jan 4, 2023
    Configuration menu
    Copy the full SHA
    2006683 View commit details
    Browse the repository at this point in the history
  9. Incorporating PR feedback from @mch2

    Signed-off-by: Kartik Ganesh <gkart@amazon.com>
    kartg committed Jan 4, 2023
    Configuration menu
    Copy the full SHA
    4339244 View commit details
    Browse the repository at this point in the history
  10. Fix IndexSettingsTests

    Updated the asserts in IndexSettingsTests to account for the new defaulting behavior.
    
    Signed-off-by: Kartik Ganesh <gkart@amazon.com>
    kartg committed Jan 4, 2023
    Configuration menu
    Copy the full SHA
    99b81ae View commit details
    Browse the repository at this point in the history