-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Update index settings during remote store migration #12748
Update index settings during remote store migration #12748
Conversation
❌ Gradle check result for c19e881: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
Compatibility status:Checks if related components are compatible with change 53c1989 Incompatible componentsSkipped componentsCompatible componentsCompatible components: [https://github.com/opensearch-project/custom-codecs.git, https://github.com/opensearch-project/asynchronous-search.git, https://github.com/opensearch-project/observability.git, https://github.com/opensearch-project/reporting.git, https://github.com/opensearch-project/flow-framework.git, https://github.com/opensearch-project/cross-cluster-replication.git, https://github.com/opensearch-project/job-scheduler.git, https://github.com/opensearch-project/opensearch-oci-object-storage.git, https://github.com/opensearch-project/common-utils.git, https://github.com/opensearch-project/geospatial.git, https://github.com/opensearch-project/neural-search.git, https://github.com/opensearch-project/k-nn.git, https://github.com/opensearch-project/anomaly-detection.git, https://github.com/opensearch-project/security-analytics.git, https://github.com/opensearch-project/sql.git, https://github.com/opensearch-project/notifications.git, https://github.com/opensearch-project/ml-commons.git, https://github.com/opensearch-project/alerting.git, https://github.com/opensearch-project/performance-analyzer-rca.git, https://github.com/opensearch-project/index-management.git, https://github.com/opensearch-project/security.git, https://github.com/opensearch-project/performance-analyzer.git] |
501b052
to
e605b95
Compare
❌ Gradle check result for 501b052: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
❌ Gradle check result for e605b95: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
@ltaragi can you please add more details to the description and link the related issue |
...nternalClusterTest/java/org/opensearch/remotemigration/RemoteStoreMigrationAllocationIT.java
Outdated
Show resolved
Hide resolved
...nternalClusterTest/java/org/opensearch/remotemigration/RemoteStoreMigrationAllocationIT.java
Outdated
Show resolved
Hide resolved
...nternalClusterTest/java/org/opensearch/remotemigration/RemoteStoreMigrationAllocationIT.java
Outdated
Show resolved
Hide resolved
.../java/org/opensearch/action/admin/cluster/settings/TransportClusterUpdateSettingsAction.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/cluster/metadata/MetadataCreateIndexService.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/snapshots/RestoreService.java
Outdated
Show resolved
Hide resolved
if the PR is ready, lets publish it. its currently in draft |
.../java/org/opensearch/action/admin/cluster/settings/TransportClusterUpdateSettingsAction.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/cluster/metadata/MetadataCreateIndexService.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/cluster/metadata/MetadataCreateIndexService.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/cluster/metadata/MetadataCreateIndexService.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/cluster/metadata/MetadataCreateIndexService.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/snapshots/RestoreService.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/snapshots/RestoreService.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/snapshots/RestoreService.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/snapshots/RestoreService.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/snapshots/RestoreService.java
Outdated
Show resolved
Hide resolved
❌ Gradle check result for 51cc9df: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
51cc9df
to
5e3b82a
Compare
❌ Gradle check result for 5e3b82a: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #12748 +/- ##
============================================
+ Coverage 71.42% 71.45% +0.03%
- Complexity 59978 60556 +578
============================================
Files 4985 5033 +48
Lines 282275 284972 +2697
Branches 40946 41299 +353
============================================
+ Hits 201603 203636 +2033
- Misses 63999 64511 +512
- Partials 16673 16825 +152 ☔ View full report in Codecov by Sentry. |
4c23b6b
to
8e55204
Compare
8e55204
to
c0aca30
Compare
Signed-off-by: Lakshya Taragi <[email protected]>
b1c049e
to
fe8d1b5
Compare
Signed-off-by: Lakshya Taragi <[email protected]>
...src/internalClusterTest/java/org/opensearch/remotemigration/ShardAllocationBaseTestCase.java
Outdated
Show resolved
Hide resolved
server/src/test/java/org/opensearch/cluster/metadata/MetadataCreateIndexServiceTests.java
Outdated
Show resolved
Hide resolved
server/src/test/java/org/opensearch/cluster/metadata/MetadataCreateIndexServiceTests.java
Outdated
Show resolved
Hide resolved
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, some minor changes in UTs
❌ Gradle check result for 51c5705: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
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.
Good to see that docrep
direction is also potentially handled in this PR itself . Thanks Lakshya and Varun.
❌ Gradle check result for 2931a1c: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
Signed-off-by: Lakshya Taragi <[email protected]>
2931a1c
to
b0549e5
Compare
Signed-off-by: Lakshya Taragi <[email protected]>
0028922
to
53c1989
Compare
❌ Gradle check result for b0549e5: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
❕ Gradle check result for 0028922: UNSTABLE
Please review all flaky tests that succeeded after retry and create an issue if one does not already exist to track the flaky failure. |
❕ Gradle check result for 53c1989: UNSTABLE
Please review all flaky tests that succeeded after retry and create an issue if one does not already exist to track the flaky failure. |
server/src/main/java/org/opensearch/cluster/metadata/MetadataCreateIndexService.java
Show resolved
Hide resolved
The backport to
To backport manually, run these commands in your terminal: # Navigate to the root of your repository
cd $(git rev-parse --show-toplevel)
# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/OpenSearch/backport-2.x 2.x
# Navigate to the new working tree
pushd ../.worktrees/OpenSearch/backport-2.x
# Create a new branch
git switch --create backport/backport-12748-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 c168e1c9216ba914fcd5c310ffb070df8ef5e6b5
# Push it to GitHub
git push --set-upstream origin backport/backport-12748-to-2.x
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/OpenSearch/backport-2.x Then, create a pull request where the |
…ct#12748) Signed-off-by: Lakshya Taragi <[email protected]> (cherry picked from commit c168e1c)
Signed-off-by: Lakshya Taragi <[email protected]> (cherry picked from commit c168e1c)
if (RemoteStoreNodeAttribute.isRemoteStoreAttributePresent(clusterService.getSettings()) == true | ||
|| clusterSettings.get(IndicesService.CLUSTER_INDEX_RESTRICT_REPLICATION_TYPE_SETTING) == true) { |
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.
this logic might not work well during remote store -> docrep
migration. so, this code runs in cluster manager node, if during migration from remote store -> docrep
, user updates setting of one of the non cluster manager node first and if cluster manager still have the remote store attributes this will restore the indices as remote store enabled.
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.
we should maybe check (if mode is STRICT and remote store attribute is present) || (migration to remote is ongoing)
.
Description
MIXED
compatibility mode andREMOTE_STORE
migration direction:updateRemoteStoreSettings
looks for theMIGRATION_DIRECTION_SETTING
andREMOTE_STORE_COMPATIBILITY_MODE_SETTING
inside theclusterSettings
objectREMOTE_STORE
andMIXED
values respectively, it obtains theREMOTE_STORE_TRANSLOG_REPOSITORY_NAME
andREMOTE_STORE_SEGMENT_REPOSITORY_NAME
from any of the remote nodes in the mixed cluster. Information of nodes is obtained from theclusterState
object.SETTING_REMOTE_STORE_ENABLED
astrue
for the index settings.Related Issues
Check List
Failing checks are inspected and point to the corresponding known issue(s) (See: Troubleshooting Failing Builds)Commit changes are listed out in CHANGELOG.md file (See: Changelog)Public documentation issue/PR createdBy 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.