Skip to content

Conversation

@xuxiong1
Copy link
Contributor

Description

This enables plugins to provide custom Store implementations per index.

  • Extend IndexStorePlugin interface with StoreFactory and getStoreFactories() method
  • Add INDEX_STORE_FACTORY_SETTING to allow plugins to provide custom Store factories
  • Update IndexService to use pluggable StoreFactory for shard Store creation
  • Make Store.LoadedMetadata and Store.OnClose public API for custom store plugin developers
  • Support factory selection via index.store.factory setting with fallback to default Store

Will have a PR later to actually implement the Store plugin, which would have a custom store implementation to handle files outside the default store index directory.

Related Issues

Resolves #19090

Check List

  • Functionality includes testing.
  • API changes companion pull request created, if applicable.
  • Public documentation issue/PR created, if applicable.

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.

@github-actions github-actions bot added enhancement Enhancement or improvement to existing feature or request Indexing:Replication Issues and PRs related to core replication framework eg segrep labels Aug 16, 2025
@xuxiong1
Copy link
Contributor Author

@yupeng9 @msfroh, please take a look, thanks!

@github-actions
Copy link
Contributor

✅ Gradle check result for 01750d3: SUCCESS

@codecov
Copy link

codecov bot commented Aug 16, 2025

Codecov Report

❌ Patch coverage is 91.66667% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 72.86%. Comparing base (1273c5a) to head (f56b79c).
⚠️ Report is 10 commits behind head on main.

Files with missing lines Patch % Lines
...rc/main/java/org/opensearch/index/IndexModule.java 91.66% 0 Missing and 1 partial ⚠️
.../java/org/opensearch/plugins/IndexStorePlugin.java 50.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main   #19091      +/-   ##
============================================
- Coverage     72.93%   72.86%   -0.08%     
- Complexity    69411    69420       +9     
============================================
  Files          5647     5647              
  Lines        319139   319161      +22     
  Branches      46163    46165       +2     
============================================
- Hits         232775   232544     -231     
- Misses        67502    67812     +310     
+ Partials      18862    18805      -57     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Signed-off-by: xuxiong1 <[email protected]>
@github-actions
Copy link
Contributor

✅ Gradle check result for f56b79c: SUCCESS

@yupeng9 yupeng9 merged commit 5e6f3ee into opensearch-project:main Aug 19, 2025
31 checks passed
atris pushed a commit to atris/OpenSearch that referenced this pull request Aug 28, 2025
…pensearch-project#19091)

* Add StoreFactory plugin interface for custom Store implementations

Signed-off-by: xuxiong1 <[email protected]>

* Resolve comments

Signed-off-by: xuxiong1 <[email protected]>

---------

Signed-off-by: xuxiong1 <[email protected]>
kh3ra pushed a commit to kh3ra/OpenSearch that referenced this pull request Sep 5, 2025
…pensearch-project#19091)

* Add StoreFactory plugin interface for custom Store implementations

Signed-off-by: xuxiong1 <[email protected]>

* Resolve comments

Signed-off-by: xuxiong1 <[email protected]>

---------

Signed-off-by: xuxiong1 <[email protected]>
vinaykpud pushed a commit to vinaykpud/OpenSearch that referenced this pull request Sep 26, 2025
…pensearch-project#19091)

* Add StoreFactory plugin interface for custom Store implementations

Signed-off-by: xuxiong1 <[email protected]>

* Resolve comments

Signed-off-by: xuxiong1 <[email protected]>

---------

Signed-off-by: xuxiong1 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Enhancement or improvement to existing feature or request Indexing:Replication Issues and PRs related to core replication framework eg segrep

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request] Support custom Store implementations through plugin

4 participants