[Remote Store] Skip downloading segments from remote store if they were written by an incompatible Lucene version #8864
Labels
enhancement
Enhancement or improvement to existing feature or request
Storage:Durability
Issues and PRs related to the durability framework
Storage
Issues and PRs relating to data and metadata storage
Is your feature request related to a problem? Please describe.
Today the Lucene version compatibility check for segments downloaded from remote store happens only after all the respective segments have actually been downloaded from the remote store. In the happy path this is fine. But when the Lucene version that wrote the segments currently residing in remote store vs. the Lucene version running on the node are incompatible (currently Lucene supports backward compatibility with 1 major version), this leads to unnecessary resource consumption for downloading the segments.
Describe the solution you'd like
There should to be an optimization which proactively skips downloading segments from remote store unnecessarily if the aforementioned Lucene (major) versions are incompatible.
Describe alternatives you've considered
The Lucene major version information, added to
UploadedSegmentMetadata
as part of resolving #7722, could be used to decide whether segments should be downloaded or not (i.e. whether the aforementioned Lucene versions are compatible or not).https://github.com/opensearch-project/OpenSearch/blob/main/server/src/main/java/org/opensearch/index/store/RemoteSegmentStoreDirectory.java#L628-L636
Additional context
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered: