-
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
[Remote Store] Primary/Replica side changes to support Dual Replication #12821
[Remote Store] Primary/Replica side changes to support Dual Replication #12821
Conversation
163635b
to
50cb08a
Compare
Compatibility status:Checks if related components are compatible with change 0ed42b8 Incompatible componentsSkipped componentsCompatible componentsCompatible components: [https://github.com/opensearch-project/custom-codecs.git, https://github.com/opensearch-project/geospatial.git, https://github.com/opensearch-project/flow-framework.git, https://github.com/opensearch-project/observability.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/ml-commons.git, https://github.com/opensearch-project/k-nn.git, https://github.com/opensearch-project/neural-search.git, https://github.com/opensearch-project/notifications.git, https://github.com/opensearch-project/security-analytics.git, https://github.com/opensearch-project/asynchronous-search.git, https://github.com/opensearch-project/sql.git, https://github.com/opensearch-project/reporting.git, https://github.com/opensearch-project/common-utils.git, https://github.com/opensearch-project/performance-analyzer-rca.git, https://github.com/opensearch-project/anomaly-detection.git, https://github.com/opensearch-project/index-management.git, https://github.com/opensearch-project/security.git, https://github.com/opensearch-project/alerting.git, https://github.com/opensearch-project/performance-analyzer.git] |
❌ Gradle check result for 163635b: 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 50cb08a: 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? |
82f2562
to
8aabf1a
Compare
❌ Gradle check result for 82f2562: 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 8aabf1a: 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 0a5ef5b: 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? |
server/src/main/java/org/opensearch/action/bulk/TransportShardBulkAction.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/action/support/replication/TransportReplicationAction.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/action/support/replication/ReplicationModeAwareProxy.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/index/seqno/ReplicationTracker.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/index/seqno/ReplicationTracker.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/index/seqno/ReplicationTracker.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/index/seqno/ReplicationTracker.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/index/shard/IndexShard.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/indices/cluster/IndicesClusterStateService.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/indices/cluster/IndicesClusterStateService.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/indices/cluster/IndicesClusterStateService.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/indices/cluster/IndicesClusterStateService.java
Outdated
Show resolved
Hide resolved
...internalClusterTest/java/org/opensearch/remotemigration/DocrepToRemoteDualReplicationIT.java
Outdated
Show resolved
Hide resolved
...internalClusterTest/java/org/opensearch/remotemigration/DocrepToRemoteDualReplicationIT.java
Outdated
Show resolved
Hide resolved
...internalClusterTest/java/org/opensearch/remotemigration/DocrepToRemoteDualReplicationIT.java
Outdated
Show resolved
Hide resolved
...internalClusterTest/java/org/opensearch/remotemigration/DocrepToRemoteDualReplicationIT.java
Outdated
Show resolved
Hide resolved
...internalClusterTest/java/org/opensearch/remotemigration/DocrepToRemoteDualReplicationIT.java
Outdated
Show resolved
Hide resolved
...internalClusterTest/java/org/opensearch/remotemigration/DocrepToRemoteDualReplicationIT.java
Outdated
Show resolved
Hide resolved
@shourya035 Lets add one more usecase for integ test -
|
@ashking94 We don't have that piece ready yet. As of now, if a primary in remote fails, the failover can happen to either docrep or remote copy. @ltaragi is working on this piece wherein failover preference would be given to the remote copy over the docrep one. |
server/src/main/java/org/opensearch/action/bulk/TransportShardBulkAction.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/action/support/replication/ReplicationModeAwareProxy.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/action/support/replication/ReplicationModeAwareProxy.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/action/support/replication/TransportReplicationAction.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/cluster/routing/ShardRouting.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/index/remote/RemoteStoreUtils.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/index/seqno/ReplicationTracker.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/index/seqno/ReplicationTracker.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/indices/cluster/IndicesClusterStateService.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/indices/replication/checkpoint/PublishCheckpointAction.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Shourya Dutta Biswas <114977491+shourya035@users.noreply.github.com>
Signed-off-by: Shourya Dutta Biswas <114977491+shourya035@users.noreply.github.com>
Signed-off-by: Shourya Dutta Biswas <114977491+shourya035@users.noreply.github.com>
6a4b944
to
04fc5cb
Compare
Signed-off-by: Shourya Dutta Biswas <114977491+shourya035@users.noreply.github.com>
❌ Gradle check result for 3a39232: 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: Shourya Dutta Biswas <114977491+shourya035@users.noreply.github.com>
❌ Gradle check result for b11585a: 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? |
server/src/main/java/org/opensearch/action/support/replication/ReplicationModeAwareProxy.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/index/seqno/ReplicationTracker.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/index/shard/IndexShard.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/index/shard/StoreRecovery.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Shourya Dutta Biswas <114977491+shourya035@users.noreply.github.com>
server/src/test/java/org/opensearch/action/support/replication/ReplicationOperationTests.java
Show resolved
Hide resolved
server/src/internalClusterTest/java/org/opensearch/remotemigration/RemoteDualMigrationIT.java
Outdated
Show resolved
Hide resolved
server/src/internalClusterTest/java/org/opensearch/remotemigration/RemoteDualMigrationIT.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, left some minor comments, pls address them.
server/src/main/java/org/opensearch/action/bulk/TransportShardBulkAction.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/action/support/replication/ReplicationModeAwareProxy.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Shourya Dutta Biswas <114977491+shourya035@users.noreply.github.com>
❌ Gradle check result for 77798c7: 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: Shourya Dutta Biswas <114977491+shourya035@users.noreply.github.com>
❕ Gradle check result for 0ed42b8: 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. |
…cation during Remote Store Migration (opensearch-project#12821) Signed-off-by: Shourya Dutta Biswas <114977491+shourya035@users.noreply.github.com>
…cation during Remote Store Migration (opensearch-project#12821) Signed-off-by: Shourya Dutta Biswas <114977491+shourya035@users.noreply.github.com>
…cation during Remote Store Migration (opensearch-project#12821) Signed-off-by: Shourya Dutta Biswas <114977491+shourya035@users.noreply.github.com>
…port Dual Replication during Remote Store Migration (#13028) * [Remote Store] Add Primary/Replica side changes to support Dual Replication during Remote Store Migration (#12821) Signed-off-by: Shourya Dutta Biswas <114977491+shourya035@users.noreply.github.com> * Fix build due to multiple commits to same file causing compilation failure (#13019) Signed-off-by: Gaurav Bafna <gbbafna@amazon.com> Signed-off-by: Shourya Dutta Biswas <114977491+shourya035@users.noreply.github.com> --------- Signed-off-by: Shourya Dutta Biswas <114977491+shourya035@users.noreply.github.com>
…cation during Remote Store Migration (opensearch-project#12821) Signed-off-by: Shourya Dutta Biswas <114977491+shourya035@users.noreply.github.com> Signed-off-by: Shivansh Arora <hishiv@amazon.com>
…cation during Remote Store Migration (opensearch-project#12821) Signed-off-by: Shourya Dutta Biswas <114977491+shourya035@users.noreply.github.com>
Description
This PR adds support for dual mode replication during remote store migration; Changes made:
indexShard.isRemoteTranslogStoreEnabled
toindexShard.indexSettings().isRemoteNode
. This ensures that shards started on Remote store enabled nodes performs remote based operations in the replication flow.DiscoveryNodes
obtained from ClusterState toIndexShard
. AFunction
implementation is passed on toReplicationTracker
as a supplier to check if the shards in a replication group is assigned to a remote or docrep nodeReplicationModeAwareProxy
would determine whether replication actions needs to be dropped or fan out to the corresponding replica shard copy. Replication overrides are bypassed and all actions are fanned out if the target shard copy is residing in a docrep enabled nodeAdded integration tests to test out the following flows:
Old PR raised on @gbbafna 's fork: gbbafna#152
Related Issues
Partially resolves: #12413
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.