-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[Remote Store] Persist StoreFileMetadata fields in Remote Store #7722
Comments
I was looking into this and wanted to get some additional clarity on the expected end result. Do we want to associate the Lucene version with:
(additional thoughts below) If 1, If we want to associate the Lucene version with each uploaded metadata file, we may be able to retrieve it using the segment metadata structure that exists today. As part of Lines 93 to 107 in 4b4d84e
The Lucene version can be retrieved as If 2, If we want to associate the Lucene version with each uploaded segment, we would need to associate the Lucene version with each While the OpenSearch/server/src/main/java/org/opensearch/index/store/RemoteSegmentStoreDirectory.java Lines 447 to 494 in 4b4d84e
... we actually need access to it during the actual segment file upload... OpenSearch/server/src/main/java/org/opensearch/index/shard/RemoteStoreRefreshListener.java Lines 514 to 523 in 4b4d84e
... because as part of the upload, we also construct the OpenSearch/server/src/main/java/org/opensearch/index/store/RemoteSegmentStoreDirectory.java Lines 417 to 418 in 4b4d84e
I will need to work on identifying a good way to achieve this, if option 2 is the preferred end result. Thanks! |
IMO, we can add version info as part of metadata. A metadata file corresponds to a commit. It is not possible to create segments of different Lucene versions without committing first. |
But if I look at StoreFileMetadata, it has version info for each file. Need to understand why it was done this way instead of storing info in the |
This would be due to the backward compatibility that is maintained across major Lucene versions (at most 1). So, it is possible that one metadata file will refer to segment files from different versions. So, we have to go with Option 2. |
Thanks Sachin for the inputs! I will work on option 2 then. |
I agree with @sachinpkale, we need version for each segment file as part of the metadata. Backwards compatibility can be a concern since you can have older segments in an index which were written on older lucene versions(e.g. version upgrade). |
For version upgrades we just need the min version in the commit. However in future it might help to selectively upgrade fewer segments as needed. |
Is your feature request related to a problem? Please describe.
We need to capture the Lucene version of the segment files maintained on the remote store to support version currency and compatibility checks.
Describe the solution you'd like
Consider capturing the metadata information while persisting segments to remote store
https://github.com/opensearch-project/OpenSearch/blob/main/server/src/main/java/org/opensearch/index/store/StoreFileMetadata.java
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered: