[BUG] Reject explicitly set empty index.store.type (GH#22550) - #22592
Open
waterWang wants to merge 1 commit into
Open
[BUG] Reject explicitly set empty index.store.type (GH#22550)#22592waterWang wants to merge 1 commit into
waterWang wants to merge 1 commit into
Conversation
Contributor
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
navneet1v
reviewed
Jul 28, 2026
Comment on lines
+1406
to
+1412
| if (IndexModule.INDEX_STORE_TYPE_SETTING.exists(settings)) { | ||
| String storeType = IndexModule.INDEX_STORE_TYPE_SETTING.get(settings); | ||
| if (storeType.isEmpty()) { | ||
| throw new IllegalArgumentException( | ||
| "Failed to parse value for setting [" + IndexModule.INDEX_STORE_TYPE_SETTING.getKey() + "] must not be empty" | ||
| ); | ||
| } |
Contributor
There was a problem hiding this comment.
can we add a unit test for this change
Contributor
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #22592 +/- ##
============================================
- Coverage 71.43% 71.41% -0.02%
- Complexity 76760 76794 +34
============================================
Files 6142 6142
Lines 357766 357799 +33
Branches 52148 52164 +16
============================================
- Hits 255581 255539 -42
- Misses 81861 81945 +84
+ Partials 20324 20315 -9 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes #22550 — Creating an index with
index.store.typeexplicitly set to an empty string is accepted, but the primary shard subsequently fails to initialize and the index remains red.Root Cause
The
INDEX_STORE_TYPE_SETTINGdefinition inIndexModule.javahas no validation for the store type value, and thevalidateStoreTypeSettingsmethod inMetadataCreateIndexService.javaonly checks for deprecatedsimplefstype.Fix
Add validation in
validateStoreTypeSettingsto reject an explicitly set empty store type before the index metadata is committed. The empty string default is preserved for backward compatibility (when the setting is not specified, the default store type is used).Related Issues