Skip to content

Commit b34224d

Browse files
authored
Merge branch 'opensearch-project:main' into bugfix-add-empty-dirs-for-docker
2 parents 1e368ed + 5495c64 commit b34224d

File tree

19 files changed

+368
-87
lines changed

19 files changed

+368
-87
lines changed

.ci/bwcVersions

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,5 @@ BWC_VERSION:
2121
- "2.8.0"
2222
- "2.8.1"
2323
- "2.9.0"
24+
- "2.9.1"
2425
- "2.10.0"

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
4646
- Change http code on create index API with bad input raising NotXContentException from 500 to 400 ([#4773](https://github.com/opensearch-project/OpenSearch/pull/4773))
4747
- Improve summary error message for invalid setting updates ([#4792](https://github.com/opensearch-project/OpenSearch/pull/4792))
4848
- Remote Segment Store Repository setting moved from `index.remote_store.repository` to `index.remote_store.segment.repository` and `cluster.remote_store.repository` to `cluster.remote_store.segment.repository` respectively for Index and Cluster level settings ([#8719](https://github.com/opensearch-project/OpenSearch/pull/8719))
49+
- [Remote Store] Add support to restore only unassigned shards of an index ([#8792](https://github.com/opensearch-project/OpenSearch/pull/8792))
4950
- Replace the deprecated IndexReader APIs with new storedFields() & termVectors() ([#7792](https://github.com/opensearch-project/OpenSearch/pull/7792))
5051

5152
### Deprecated

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,7 @@ subprojects {
470470
maxFailures = 10
471471
}
472472
failOnPassedAfterRetry = false
473-
classRetry {
473+
filter {
474474
includeClasses.add("org.opensearch.action.admin.cluster.node.tasks.ResourceAwareTasksTests")
475475
includeClasses.add("org.opensearch.action.admin.cluster.tasks.PendingTasksBlocksIT")
476476
includeClasses.add("org.opensearch.action.admin.indices.create.CreateIndexIT")

libs/core/src/main/java/org/opensearch/Version.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ public class Version implements Comparable<Version>, ToXContentFragment {
9090
public static final Version V_2_8_0 = new Version(2080099, org.apache.lucene.util.Version.LUCENE_9_6_0);
9191
public static final Version V_2_8_1 = new Version(2080199, org.apache.lucene.util.Version.LUCENE_9_6_0);
9292
public static final Version V_2_9_0 = new Version(2090099, org.apache.lucene.util.Version.LUCENE_9_7_0);
93+
public static final Version V_2_9_1 = new Version(2090199, org.apache.lucene.util.Version.LUCENE_9_7_0);
9394
public static final Version V_2_10_0 = new Version(2100099, org.apache.lucene.util.Version.LUCENE_9_7_0);
9495
public static final Version V_3_0_0 = new Version(3000099, org.apache.lucene.util.Version.LUCENE_9_8_0);
9596
public static final Version CURRENT = V_3_0_0;

server/src/internalClusterTest/java/org/opensearch/remotestore/RemoteStoreBaseIntegTestCase.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
import java.nio.file.Path;
2727
import java.nio.file.SimpleFileVisitor;
2828
import java.nio.file.attribute.BasicFileAttributes;
29+
import java.util.List;
2930
import java.util.concurrent.atomic.AtomicInteger;
3031

3132
import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked;
@@ -37,6 +38,13 @@ public class RemoteStoreBaseIntegTestCase extends OpenSearchIntegTestCase {
3738
protected static final int REPLICA_COUNT = 1;
3839
protected Path absolutePath;
3940
protected Path absolutePath2;
41+
private final List<String> documentKeys = List.of(
42+
randomAlphaOfLength(5),
43+
randomAlphaOfLength(5),
44+
randomAlphaOfLength(5),
45+
randomAlphaOfLength(5),
46+
randomAlphaOfLength(5)
47+
);
4048

4149
@Override
4250
protected boolean addMockInternalEngine() {
@@ -59,7 +67,7 @@ public Settings indexSettings() {
5967
IndexResponse indexSingleDoc(String indexName) {
6068
return client().prepareIndex(indexName)
6169
.setId(UUIDs.randomBase64UUID())
62-
.setSource(randomAlphaOfLength(5), randomAlphaOfLength(5))
70+
.setSource(documentKeys.get(randomIntBetween(0, documentKeys.size() - 1)), randomAlphaOfLength(5))
6371
.get();
6472
}
6573

server/src/internalClusterTest/java/org/opensearch/remotestore/RemoteStoreForceMergeIT.java

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,17 @@ private void testRestoreWithMergeFlow(int numberOfIterations, boolean invokeFlus
104104
Map<String, Long> indexStats = indexData(numberOfIterations, invokeFlush, flushAfterMerge, deletedDocs);
105105

106106
internalCluster().stopRandomNode(InternalTestCluster.nameFilter(primaryNodeName(INDEX_NAME)));
107-
assertAcked(client().admin().indices().prepareClose(INDEX_NAME));
108107

109-
client().admin().cluster().restoreRemoteStore(new RestoreRemoteStoreRequest().indices(INDEX_NAME), PlainActionFuture.newFuture());
108+
boolean restoreAllShards = randomBoolean();
109+
if (restoreAllShards) {
110+
assertAcked(client().admin().indices().prepareClose(INDEX_NAME));
111+
}
112+
client().admin()
113+
.cluster()
114+
.restoreRemoteStore(
115+
new RestoreRemoteStoreRequest().indices(INDEX_NAME).restoreAllShards(restoreAllShards),
116+
PlainActionFuture.newFuture()
117+
);
110118
ensureGreen(INDEX_NAME);
111119

112120
if (deletedDocs == -1) {

0 commit comments

Comments
 (0)