Skip to content

Commit fc6800b

Browse files
authored
Merge branch 'opensearch-project:main' into feat/hunspell-ref-path-core
2 parents 1513ae8 + 55c022a commit fc6800b

File tree

21 files changed

+3000
-50
lines changed

21 files changed

+3000
-50
lines changed

.ci/bwcVersions

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ BWC_VERSION:
4848
- "2.19.3"
4949
- "2.19.4"
5050
- "2.19.5"
51+
- "2.19.6"
5152
- "3.0.0"
5253
- "3.1.0"
5354
- "3.2.0"

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
2929
- Use env variable (OPENSEARCH_FIPS_MODE) to enable opensearch to run in FIPS enforced mode instead of checking for existence of bcFIPS jars ([#20625](https://github.com/opensearch-project/OpenSearch/pull/20625))
3030
- Update streaming flag to use search request context ([#20530](https://github.com/opensearch-project/OpenSearch/pull/20530))
3131
- Move pull-based ingestion classes from experimental to publicAPI ([#20704](https://github.com/opensearch-project/OpenSearch/pull/20704))
32+
- Disable concurrent search for filter duplicates in significant_text ([#20857](https://github.com/opensearch-project/OpenSearch/pull/20857))
3233

3334
### Fixed
35+
- Relax index template pattern overlap check to use minimum-string heuristic, allowing distinguishable multi-wildcard patterns at the same priority ([#20702](https://github.com/opensearch-project/OpenSearch/pull/20702))
3436
- Fix `AutoForceMergeMetrics` silently dropping tags due to unreassigned `addTag()` return value ([#20788](https://github.com/opensearch-project/OpenSearch/pull/20788))
3537
- Fix flaky test failures in ShardsLimitAllocationDeciderIT ([#20375](https://github.com/opensearch-project/OpenSearch/pull/20375))
3638
- Prevent criteria update for context aware indices ([#20250](https://github.com/opensearch-project/OpenSearch/pull/20250))
@@ -51,6 +53,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5153
- Fix ShardSearchFailure in transport-grpc ([#20641](https://github.com/opensearch-project/OpenSearch/pull/20641))
5254
- Fix TLS cert hot-reload for Arrow Flight transport ([#20732](https://github.com/opensearch-project/OpenSearch/pull/20732))
5355
- Fix misleading heap usage cancellation message in SearchBackpressureService ([#20779](https://github.com/opensearch-project/OpenSearch/pull/20779))
56+
- Fix task details JSON logs with nested JSON in metadata are not properly escaped ([#20802](https://github.com/opensearch-project/OpenSearch/pull/20802))
5457
- Delegate getMin/getMax methods for ExitableTerms ([#20775](https://github.com/opensearch-project/OpenSearch/pull/20775))
5558
- Fix terms lookup subquery fetch limit reading from non-existent index setting instead of cluster `max_clause_count` ([#20823](https://github.com/opensearch-project/OpenSearch/pull/20823))
5659
- Fix array_index_out_of_bounds_exception with wildcard and aggregations ([#20842](https://github.com/opensearch-project/OpenSearch/pull/20842))

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ public class Version implements Comparable<Version>, ToXContentFragment {
127127
public static final Version V_2_19_3 = new Version(2190399, org.apache.lucene.util.Version.LUCENE_9_12_2);
128128
public static final Version V_2_19_4 = new Version(2190499, org.apache.lucene.util.Version.LUCENE_9_12_3);
129129
public static final Version V_2_19_5 = new Version(2190599, org.apache.lucene.util.Version.LUCENE_9_12_3);
130+
public static final Version V_2_19_6 = new Version(2190699, org.apache.lucene.util.Version.LUCENE_9_12_3);
130131
public static final Version V_3_0_0 = new Version(3000099, org.apache.lucene.util.Version.LUCENE_10_1_0);
131132
public static final Version V_3_1_0 = new Version(3010099, org.apache.lucene.util.Version.LUCENE_10_2_1);
132133
public static final Version V_3_2_0 = new Version(3020099, org.apache.lucene.util.Version.LUCENE_10_2_2);

qa/logging-config/src/test/java/org/opensearch/common/logging/OpenSearchJsonLayoutTests.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,8 @@ public void testLayoutWithAdditionalFields() {
122122
"\"cluster.name\": \"${sys:opensearch.logs.cluster_name}\", " +
123123
"\"node.name\": \"%node_name\", " +
124124
"\"message\": \"%notEmpty{%enc{%marker}{JSON} }%enc{%.-10000m}{JSON}\"" +
125-
"%notEmpty{, \"x-opaque-id\": \"%OpenSearchMessageField{x-opaque-id}\"}" +
126-
"%notEmpty{, \"someOtherField\": \"%OpenSearchMessageField{someOtherField}\"}" +
125+
"%notEmpty{, \"x-opaque-id\": \"%enc{%OpenSearchMessageField{x-opaque-id}}{JSON}\"}" +
126+
"%notEmpty{, \"someOtherField\": \"%enc{%OpenSearchMessageField{someOtherField}}{JSON}\"}" +
127127
"%notEmpty{, %node_and_cluster_id }" +
128128
"%exceptionAsJson }" + System.lineSeparator()));
129129
}
@@ -143,7 +143,7 @@ public void testLayoutWithAdditionalFieldOverride() {
143143
"\"component\": \"%c{1.}\", " +
144144
"\"cluster.name\": \"${sys:opensearch.logs.cluster_name}\", " +
145145
"\"node.name\": \"%node_name\"" +
146-
"%notEmpty{, \"message\": \"%OpenSearchMessageField{message}\"}" +
146+
"%notEmpty{, \"message\": \"%enc{%OpenSearchMessageField{message}}{JSON}\"}" +
147147
"%notEmpty{, %node_and_cluster_id }" +
148148
"%exceptionAsJson }" + System.lineSeparator()));
149149
}

rest-api-spec/src/main/resources/rest-api-spec/test/indices.put_index_template/10_basic.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,51 @@
102102
number_of_shards: 1
103103
number_of_replicas: 0
104104

105+
---
106+
"Put distinguishable multi-wildcard templates at the same priority":
107+
- skip:
108+
features: allowed_warnings
109+
version: " - 3.5.99"
110+
reason: "template overlap check was relaxed in 3.6"
111+
112+
- do:
113+
allowed_warnings:
114+
- "index template [app-test-some] has index patterns [app-test-*-some-*] matching patterns from existing older templates [global] with patterns (global => [*]); this template [app-test-some] will take precedence during new index creation"
115+
indices.put_index_template:
116+
name: app-test-some
117+
body:
118+
index_patterns: ["app-test-*-some-*"]
119+
priority: 0
120+
121+
# The second template has a literal segment after the first wildcard that differs from the first
122+
# template (-some_other- vs -some-), so the two patterns do not practically overlap and both
123+
# templates should be accepted at the same priority.
124+
- do:
125+
allowed_warnings:
126+
- "index template [app-test-some-other] has index patterns [app-test-*-some_other-*] matching patterns from existing older templates [global] with patterns (global => [*]); this template [app-test-some-other] will take precedence during new index creation"
127+
indices.put_index_template:
128+
name: app-test-some-other
129+
body:
130+
index_patterns: ["app-test-*-some_other-*"]
131+
priority: 0
132+
133+
- do:
134+
indices.get_index_template:
135+
name: app-test-some
136+
- match: {index_templates.0.index_template.index_patterns: ["app-test-*-some-*"]}
137+
138+
- do:
139+
indices.get_index_template:
140+
name: app-test-some-other
141+
- match: {index_templates.0.index_template.index_patterns: ["app-test-*-some_other-*"]}
142+
143+
- do:
144+
indices.delete_index_template:
145+
name: app-test-some
146+
- do:
147+
indices.delete_index_template:
148+
name: app-test-some-other
149+
105150
---
106151
"Put index template without index_patterns":
107152

server/src/internalClusterTest/java/org/opensearch/indexing/IndexActionIT.java

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
import org.opensearch.index.VersionType;
4545
import org.opensearch.index.mapper.MapperParsingException;
4646
import org.opensearch.indices.InvalidIndexNameException;
47+
import org.opensearch.search.SearchHit;
4748
import org.opensearch.test.ParameterizedStaticSettingsOpenSearchIntegTestCase;
4849
import org.opensearch.test.hamcrest.OpenSearchAssertions;
4950

@@ -97,12 +98,22 @@ public void testAutoGenerateIdNoDuplicates() throws Exception {
9798
logger.debug("running search");
9899
SearchResponse response = client().prepareSearch(indexName).get();
99100
if (response.getHits().getTotalHits().value() != numOfDocs) {
101+
// Fetch all docs to identify the unexpected documents
102+
SearchResponse allDocs = client().prepareSearch(indexName)
103+
.setSize((int) response.getHits().getTotalHits().value())
104+
.get();
105+
StringBuilder docDetails = new StringBuilder();
106+
for (SearchHit hit : allDocs.getHits().getHits()) {
107+
docDetails.append("\n id=").append(hit.getId()).append(" source=").append(hit.getSourceAsString());
108+
}
100109
final String message = "Count is "
101110
+ response.getHits().getTotalHits().value()
102111
+ " but "
103112
+ numOfDocs
104113
+ " was expected. "
105-
+ OpenSearchAssertions.formatShardStatus(response);
114+
+ OpenSearchAssertions.formatShardStatus(response)
115+
+ "\nAll documents:"
116+
+ docDetails;
106117
logger.error("{}. search response: \n{}", message, response);
107118
fail(message);
108119
}

0 commit comments

Comments
 (0)