Skip to content

Commit a71278e

Browse files
committed
Merge remote-tracking branch 'origin/2.x' into backport/backport-15508-to-2.x
2 parents 42d7812 + 00b2fcc commit a71278e

File tree

58 files changed

+1927
-268
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+1927
-268
lines changed

.github/workflows/assemble.yml

+3-6
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,8 @@ jobs:
3030
- name: Setup docker (missing on MacOS)
3131
id: setup_docker
3232
if: runner.os == 'macos'
33-
uses: douglascamata/setup-docker-macos-action@main
34-
continue-on-error: true
35-
with:
36-
upgrade-qemu: true
37-
colima: v0.6.8
33+
run: |
34+
exit 0;
3835
- name: Run Gradle (assemble)
3936
if: runner.os == 'macos' && steps.setup_docker.outcome != 'success'
4037
run: |
@@ -48,4 +45,4 @@ jobs:
4845
- name: Run Gradle (assemble)
4946
if: runner.os == 'macos' && steps.setup_docker.outcome == 'success'
5047
run: |
51-
./gradlew assemble --parallel --no-build-cache -PDISABLE_BUILD_CACHE -Druntime.java=${{ matrix.java }}
48+
exit 0;

CHANGELOG.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,17 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
3939
- Adding translog durability validation in index templates ([#15494](https://github.com/opensearch-project/OpenSearch/pull/15494))
4040
- [Range Queries] Add new approximateable query framework to short-circuit range queries ([#13788](https://github.com/opensearch-project/OpenSearch/pull/13788))
4141
- [Workload Management] Add query group level failure tracking ([#15227](https://github.com/opensearch-project/OpenSearch/pull/15527))
42-
- [Reader Writer Separation] Add searchOnly replica routing configuration ([#15410](https://github.com/opensearch-project/OpenSearch/pull/15410))
42+
- [Reader Writer Separation] Add experimental search replica shard type to achieve reader writer separation ([#15237](https://github.com/opensearch-project/OpenSearch/pull/15237))
4343
- Add index creation using the context field ([#15290](https://github.com/opensearch-project/OpenSearch/pull/15290))
4444
- [Remote Publication] Add remote download stats ([#15291](https://github.com/opensearch-project/OpenSearch/pull/15291)))
4545
- Add support to upload snapshot shard blobs with hashed prefix ([#15426](https://github.com/opensearch-project/OpenSearch/pull/15426))
4646
- Add prefix support to hashed prefix & infix path types on remote store ([#15557](https://github.com/opensearch-project/OpenSearch/pull/15557))
4747
- Add canRemain method to TargetPoolAllocationDecider to move shards from local to remote pool for hot to warm tiering ([#15010](https://github.com/opensearch-project/OpenSearch/pull/15010))
4848
- Add support for pluggable deciders for concurrent search ([#15363](https://github.com/opensearch-project/OpenSearch/pull/15363))
4949
- Add support for comma-separated list of index names to be used with Snapshot Status API ([#15409](https://github.com/opensearch-project/OpenSearch/pull/15409))[SnapshotV2] Snapshot Status API changes (#15409))
50+
- Optimise snapshot deletion to speed up snapshot deletion and creation ([#15568](https://github.com/opensearch-project/OpenSearch/pull/15568))
5051
- [Remote Publication] Added checksum validation for cluster state behind a cluster setting ([#15218](https://github.com/opensearch-project/OpenSearch/pull/15218))
52+
- Relax the join validation for Remote State publication ([#15471](https://github.com/opensearch-project/OpenSearch/pull/15471))
5153
- Optimize NodeIndicesStats output behind flag ([#14454](https://github.com/opensearch-project/OpenSearch/pull/14454))
5254
- ClusterManagerTaskThrottler Improvements ([#15508](https://github.com/opensearch-project/OpenSearch/pull/15508))
5355

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
/*
2+
* SPDX-License-Identifier: Apache-2.0
3+
*
4+
* The OpenSearch Contributors require contributions made to
5+
* this file be licensed under the Apache-2.0 license or a
6+
* compatible open source license.
7+
*/
8+
9+
package org.opensearch.indices.replication;
10+
11+
import org.opensearch.cluster.metadata.IndexMetadata;
12+
import org.opensearch.common.settings.Settings;
13+
import org.opensearch.common.util.FeatureFlags;
14+
import org.opensearch.test.OpenSearchIntegTestCase;
15+
import org.junit.After;
16+
import org.junit.Before;
17+
18+
import java.nio.file.Path;
19+
20+
@OpenSearchIntegTestCase.ClusterScope(scope = OpenSearchIntegTestCase.Scope.TEST, numDataNodes = 0)
21+
public class SearchReplicaReplicationIT extends SegmentReplicationBaseIT {
22+
23+
private static final String REPOSITORY_NAME = "test-remote-store-repo";
24+
protected Path absolutePath;
25+
26+
private Boolean useRemoteStore;
27+
28+
@Before
29+
public void randomizeRemoteStoreEnabled() {
30+
useRemoteStore = randomBoolean();
31+
}
32+
33+
@Override
34+
protected Settings nodeSettings(int nodeOrdinal) {
35+
if (useRemoteStore) {
36+
if (absolutePath == null) {
37+
absolutePath = randomRepoPath().toAbsolutePath();
38+
}
39+
return Settings.builder()
40+
.put(super.nodeSettings(nodeOrdinal))
41+
.put(remoteStoreClusterSettings(REPOSITORY_NAME, absolutePath))
42+
.build();
43+
}
44+
return super.nodeSettings(nodeOrdinal);
45+
}
46+
47+
@After
48+
public void teardown() {
49+
if (useRemoteStore) {
50+
clusterAdmin().prepareCleanupRepository(REPOSITORY_NAME).get();
51+
}
52+
}
53+
54+
@Override
55+
public Settings indexSettings() {
56+
return Settings.builder()
57+
.put(super.indexSettings())
58+
.put(IndexMetadata.SETTING_NUMBER_OF_SHARDS, 1)
59+
.put(IndexMetadata.SETTING_NUMBER_OF_REPLICAS, 0)
60+
.put(IndexMetadata.SETTING_NUMBER_OF_SEARCH_REPLICAS, 1)
61+
.build();
62+
}
63+
64+
@Override
65+
protected Settings featureFlagSettings() {
66+
return Settings.builder().put(super.featureFlagSettings()).put(FeatureFlags.READER_WRITER_SPLIT_EXPERIMENTAL, true).build();
67+
}
68+
69+
public void testReplication() throws Exception {
70+
internalCluster().startClusterManagerOnlyNode();
71+
final String primary = internalCluster().startDataOnlyNode();
72+
createIndex(INDEX_NAME);
73+
ensureYellowAndNoInitializingShards(INDEX_NAME);
74+
final String replica = internalCluster().startDataOnlyNode();
75+
ensureGreen(INDEX_NAME);
76+
77+
final int docCount = 10;
78+
for (int i = 0; i < docCount; i++) {
79+
client().prepareIndex(INDEX_NAME).setId(Integer.toString(i)).setSource("field", "value" + i).execute().get();
80+
}
81+
refresh(INDEX_NAME);
82+
waitForSearchableDocs(docCount, primary, replica);
83+
}
84+
85+
}

0 commit comments

Comments
 (0)