This repository was archived by the owner on Apr 11, 2024. It is now read-only.
Commit fe8844b
committed
Enhance searchable snapshots to enable a read-only view of older snapshots (opensearch-project#5429)
* Enhance searchable snapshots to enable a read-only view of older snapshots
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>
* 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>
* Incorporating PR feedback
Signed-off-by: Kartik Ganesh <gkart@amazon.com>
* Incorporate PR comments from andrross
Signed-off-by: Kartik Ganesh <gkart@amazon.com>
* Remove use of IndexSetting for minimum version for snapshots backwards compatibility
Signed-off-by: Kartik Ganesh <gkart@amazon.com>
* 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>
* Update unit tests to use try-with-resources
Signed-off-by: Kartik Ganesh <gkart@amazon.com>
* Added FeatureFlagSetter helper class
Also refactored unit test classes to use the helper class.
Signed-off-by: Kartik Ganesh <gkart@amazon.com>
* Incorporating PR feedback from @mch2
Signed-off-by: Kartik Ganesh <gkart@amazon.com>
* Fix IndexSettingsTests
Updated the asserts in IndexSettingsTests to account for the new defaulting behavior.
Signed-off-by: Kartik Ganesh <gkart@amazon.com>
Signed-off-by: Kartik Ganesh <gkart@amazon.com>1 parent 094c1d8 commit fe8844b
2 files changed
Lines changed: 3 additions & 1 deletion
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
| 60 | + | |
60 | 61 | | |
61 | 62 | | |
62 | 63 | | |
| |||
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
589 | 589 | | |
590 | 590 | | |
591 | 591 | | |
592 | | - | |
| 592 | + | |
593 | 593 | | |
594 | 594 | | |
595 | 595 | | |
| |||
755 | 755 | | |
756 | 756 | | |
757 | 757 | | |
| 758 | + | |
758 | 759 | | |
759 | 760 | | |
760 | 761 | | |
| |||
0 commit comments