Skip to content
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

[FEATURE] Update 2 cluster settings that used to enable "remote store" but got changed in version 2.10 #46

Closed
tlfeng opened this issue Jul 28, 2023 · 3 comments
Labels
enhancement New feature or request

Comments

@tlfeng
Copy link

tlfeng commented Jul 28, 2023

Is your feature request related to a problem?

A commit opensearch-project/OpenSearch@91398c3 in OpenSearch repository made 2 changes in version 2.10 (and version 2.9.0 after build No.8190, though that's after the 2.9.0 release).

Problem 1:
The cluster setting cluster.remote_store.repository is renamed to cluster.remote_store.segment.repository.
The setting is needed to use remote store feature.
opensearch-project/OpenSearch@91398c3#diff-a93623446c8ee94dffd709a37ec974ee8c27f0f9f31335f35e753ed802a8dc7b

In released version 2.9.0:
https://github.com/opensearch-project/OpenSearch/blob/2.9.0/server/src/main/java/org/opensearch/indices/IndicesService.java#L262

In current 2.x branch, which is version 2.10.0:
https://github.com/opensearch-project/OpenSearch/blob/1eea7fd6a04b0bf80d2425d59ebeadf86e650bac/server/src/main/java/org/opensearch/indices/IndicesService.java#L262

Although I created an issue in OpenSearch repository opensearch-project/OpenSearch#8902, I closed it eventually. Changing the setting name is acceptable since the feature is under feature flag.

Problem 2:
Another setting cluster.remote_store.translog.repository is changed to required in the same commit.
In the CDK script, it's fair to assign same value into translog.repository and above segment.repository.
opensearch-project/OpenSearch@91398c3#diff-ea2e29ab98d6120bb1c62077f504340d6465e5178b885631170f45d209838668R986

What solution would you like?

Add a mechanism to parse the OpenSearch version number from the String variable opensearchVersion, then having an if statement to apply to following change when OpenSearch version is equal to or above 2.10.0 .

1 Change the setting name to cluster.remote_store.segment.repository in the line

cfnInitConfig.push(InitCommand.shellCommand(`set -ex;cd opensearch; echo "cluster.remote_store.repository: ${scope.stackName}-repo" >> config/opensearch.yml`, {

2 Add echo "cluster.remote_store.translog.repository: ${scope.stackName}-repo" >> config/opensearch.yml around there.

What alternatives have you considered?

A clear and concise description of any alternative solutions or features you've considered.

Do you have any additional context?

Related to the code added by PR #38

@tlfeng tlfeng added enhancement New feature or request untriaged labels Jul 28, 2023
@tlfeng tlfeng changed the title [FEATURE] [FEATURE] Update a cluster setting name that used to enable "remote store" which renamed in version 2.10 Jul 28, 2023
@tlfeng tlfeng changed the title [FEATURE] Update a cluster setting name that used to enable "remote store" which renamed in version 2.10 [FEATURE] Update 2 cluster settings that used to enable "remote store" which got changed in version 2.10 Aug 1, 2023
@rishabh6788
Copy link
Collaborator

I'll take a look at this.

@tlfeng tlfeng changed the title [FEATURE] Update 2 cluster settings that used to enable "remote store" which got changed in version 2.10 [FEATURE] Update 2 cluster settings that used to enable "remote store" but got changed in version 2.10 Aug 1, 2023
@rishabh6788
Copy link
Collaborator

Since remote-store feature was not introduced in 2.9 it is safe to assume that this feature will be tested in version 2.10 and above and should be enabled for version 2.10 and above. There is no need to handle this in the code and the operator should be aware of when to enable it or not.

Created PR #48
@tlfeng

@tlfeng
Copy link
Author

tlfeng commented Aug 3, 2023

@rishabh6788 Thank you for taking the quick action. I will close the issue.

@tlfeng tlfeng closed this as completed Aug 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants