-
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] Create empty lucene index during restore if remote segment store is empty #6375
Conversation
Signed-off-by: Sachin Kale <kalsac@amazon.com>
Gradle Check (Jenkins) Run Completed with:
|
Codecov Report
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more @@ Coverage Diff @@
## main #6375 +/- ##
============================================
+ Coverage 70.67% 70.76% +0.08%
- Complexity 58958 59039 +81
============================================
Files 4799 4799
Lines 282432 282434 +2
Branches 40716 40717 +1
============================================
+ Hits 199622 199861 +239
+ Misses 66428 66190 -238
- Partials 16382 16383 +1
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
Running on local for a couple of hundred times before opening the PR for review. |
@@ -457,6 +457,9 @@ private void recoverFromRemoteStore(IndexShard indexShard, Repository repository | |||
// Download segments from remote segment store | |||
indexShard.syncSegmentsFromRemoteSegmentStore(true); | |||
|
|||
if (store.directory().listAll().length == 0) { | |||
store.createEmpty(indexShard.indexSettings().getIndexVersionCreated().luceneVersion); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Question] Just wondering since the creation of empty directory depends on the lucene version, do we need to handle anything for version upgrade?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should not change anything in the version compatibility as the index already exists. I think the confusion is due to PR title. We are not creating a new OpenSearch index but empty lucene index :). Let me change the title.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Signed-off-by: Sachin Kale <kalsac@amazon.com> (cherry picked from commit 1904158) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Description
Issues Resolved
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.