Skip to content
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

Java high-level REST client bulk() is not respecting the bulkRequest.requireAlias(true) method call #14136

Closed
wants to merge 143 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
143 commits
Select commit Hold shift + click to select a range
4afcc30
Issue 12958 | Updated bulk api for Rest HighLevel Client for respecti…
parv0201 Jun 10, 2024
ae3537e
Issue 12958 | Updated changelog
parv0201 Jun 10, 2024
9e1db29
Revert "Removing unused fetch sub phase processor initialization duri…
reta May 1, 2024
7f09842
Revert "Skip running gradle checks on release notes (#13477)" (#13499)
peternied May 2, 2024
6fc579e
[Remote Migration] Handle shard allocation for none migration directi…
ltaragi May 2, 2024
65ed5d2
Bump 2.x to 2.15.0 (#13495) (#13506)
reta May 2, 2024
6e792a0
Fix org.opensearch.backwards.MixedClusterClientYamlTestSuiteIT.test {…
reta May 2, 2024
987049e
Refactor implementations of query phase searcher, add empty QueryColl…
martin-gaievski May 2, 2024
da758fe
Increase cluster publish timeout in flaky test testStaleClusterManage…
rahulkarajgikar May 2, 2024
67fe5c4
Allow doc value search on unindexed boolean and date fields (#11650)
harshavamsi May 2, 2024
b458503
Add support for deep copying SearchRequest (#12295)
ansjcy May 2, 2024
368765d
Update TermsQueryBuilderTests to include TermQuery (#13517)
harshavamsi May 2, 2024
73e8a4e
[Tiered Caching] Adds stats implementation for TieredSpilloverCache (…
peteralfonsi May 3, 2024
c650e2d
Support multi ranges traversal when doing date histogram rewrite opti…
bowenlan-amzn May 3, 2024
3a64cdd
Support wildcard/regex for indices param in _remotestore/_restore (#8…
linuxpi May 3, 2024
a8e3e3e
Clear transient cluster setting at the end of the test (#13508)
gbbafna May 3, 2024
bfc5c59
FEATURE-13448: add use compound file setting (#13478)
sam-herman May 3, 2024
f4c5a1a
Update Cluster Manager Node Timeout to 3s for flaky test testHealthOn…
rahulkarajgikar May 3, 2024
0f32058
DATETIME_FORMATTER_CACHING_SETTING experimental feature should not de…
reta May 4, 2024
c6365f5
Bump com.github.spullara.mustache.java:compiler from 0.9.11 to 0.9.13…
dependabot[bot] May 6, 2024
c77d4db
Update version for batch shard allocation to 2.14 (#13469)
shiv0408 May 6, 2024
21c74c9
Bump org.apache.commons:commons-text from 1.11.0 to 1.12.0 in /test/f…
dependabot[bot] May 6, 2024
2bd73e7
Fix negative requestStats memory_size issue (#13553)
sgup432 May 7, 2024
91ef0cc
Bump org.hdrhistogram:HdrHistogram from 2.1.12 to 2.2.1 in /server (#…
dependabot[bot] May 7, 2024
77a1885
Update supported version for the bug fix of from and size parameter c…
gaobinlong May 7, 2024
6192738
add TestIssueLogging on flaky test - org.opensearch.remotestore.Remot…
linuxpi May 7, 2024
f85b2bc
Forward port 2.14 release notes to main (#13589)
andrross May 7, 2024
b4b1272
Fix IndicesRequestCache clean up logic (#13597)
sgup432 May 8, 2024
70f7fa5
Fix get field mapping API returns 404 error in mixed cluster with mul…
gaobinlong May 10, 2024
11985dc
Add TODO for Updating API Spec (#13621)
kkhatua May 10, 2024
001322b
Updating security reach out email address (#13633)
varun-lodaya May 13, 2024
ddfe0d2
[Remote Store] Permit backed futures to prevent timeouts during uploa…
vikasvb90 May 13, 2024
164560a
Bump com.gradle.enterprise from 3.17.2 to 3.17.3 (#13641)
dependabot[bot] May 13, 2024
4a8f0b0
Bump org.apache.hadoop:hadoop-minicluster from 3.3.6 to 3.4.0 in /tes…
dependabot[bot] May 13, 2024
4a1aa5c
Abstracting outbound side of transport (#13293)
VachaShah May 13, 2024
01f64bf
Allow clearing remote_store.compatibility_mode setting (#13646)
May 14, 2024
1e755cf
Main repository azure managed identity support (#12559)
chengwushi-netapp May 14, 2024
1f4f3a8
[AUTO] [main] Add bwc version 2.14.1. (#13673)
opensearch-trigger-bot[bot] May 15, 2024
57eb74c
Bump mockito from 5.11.0 to 5.12.0 (#13665)
cwperks May 15, 2024
a09b9bc
Update Pull Request Checks to match the (#13688)
prudhvigodithi May 15, 2024
a105469
Split the remote global metadata file to metadata attribute files (#1…
shiv0408 May 16, 2024
eea7d65
Enhance tika document parsing tests (#13618)
finnegancarroll May 16, 2024
1268755
Fix org.opensearch.rest.action.admin.cluster.RestNodesStatsActionTest…
gaobinlong May 16, 2024
69f58b8
Add more identifiers to gradle-check job webhook payload (#13714)
rishabh6788 May 16, 2024
912e022
Adds support to inject telemetry instances to plugins (#13636)
Gaganjuneja May 17, 2024
ea213a7
TermsAggregatorTests flaky test fix (#13567)
sandeshkr419 May 17, 2024
831bc2f
Adds latency metrics for ClusterState Appliers and Listeners (#12333)
gargharsh3134 May 20, 2024
9d59f67
Update IndicesRequestCacheIT.java (#13678)
kiranprakash154 May 20, 2024
bdc1097
Bump com.google.code.gson:gson from 2.10.1 to 2.11.0 in /plugins/repo…
dependabot[bot] May 20, 2024
179363e
Skip unnecessary string format in ThrottlingAllocationDecider when no…
imRishN May 21, 2024
2c34b0d
Bump ch.qos.logback:logback-core from 1.5.3 to 1.5.6 in /test/fixture…
dependabot[bot] May 21, 2024
091866f
Bump com.gradle.enterprise from 3.17.3 to 3.17.4 (#13753)
dependabot[bot] May 21, 2024
1b30060
Add Jay Deng as a maintainer (#13773)
sohami May 22, 2024
d61ea95
de-duping shards in ShardsBatchGatewayAllocator based on ShardId inst…
rajiv-kv May 22, 2024
89084fd
Gradle Check Optimization (#13786)
prudhvigodithi May 22, 2024
7386f68
[Remote Store] Add segment transfer timeout dynamic setting (#13679)
linuxpi May 23, 2024
192541f
[Remote Store] Upload translog checkpoint as object metadata to trans…
skumawat2025 May 23, 2024
d1d7c08
Refactor writable warm feature flag to include tiering (#13719)
neetikasinghal May 23, 2024
d353d97
[Bugfix] [Tiered Caching] Fixes issues when integrating tiered cache …
peteralfonsi May 23, 2024
be593f9
Bump netty from 4.1.109.Final to 4.1.110.Final (#13802)
reta May 24, 2024
05ef339
Add trace level logging to RepositoryURLClientYamlTestSuiteIT (#13779)
ltaragi May 24, 2024
cbff395
Add getMetadataFields to MapperService (#13819)
cwperks May 24, 2024
80de96a
Bump jackson from 2.17.0 to 2.17.1 (#13817)
reta May 24, 2024
e3fafbc
org.opensearch.repositories.s3.S3BlobStoreRepositoryTests.testRequest…
akolarkunnu May 25, 2024
13eadce
Bump reactor from 3.5.15 to 3.5.17 and reactor-netty from 1.1.17 to 1…
reta May 25, 2024
6be9f2f
Bump commons-cli:commons-cli from 1.7.0 to 1.8.0 in /plugins/reposito…
dependabot[bot] May 27, 2024
65272a7
Bump org.apache.xmlbeans:xmlbeans from 5.2.0 to 5.2.1 in /plugins/ing…
dependabot[bot] May 27, 2024
d107e30
Bump com.google.code.gson:gson in /test/fixtures/hdfs-fixture (#13842)
dependabot[bot] May 27, 2024
aa2eacf
Update to Apache Lucene 9.11.0-snapshot-4be6531 (#13850)
navneet1v May 28, 2024
90855e0
Check changed files before running gradle check (#13498)
gaiksaya May 28, 2024
a6fa11c
Optimize remote state stale file deletion (#13131)
shiv0408 May 29, 2024
919314c
Remove deprecated constant META_FIELDS_BEFORE_7DOT8 (#13860)
cwperks May 29, 2024
4032f12
Enabled reloading functionality for reloading KNNVectorsFormat SPIs f…
navneet1v May 29, 2024
f4cafe9
Move CHANGELOG entry for #13860 to CHANGELOG 3.0 (#13874)
cwperks May 29, 2024
cd1e423
Remove changelog entry for the released fix (#13598)
sgup432 May 29, 2024
42e71f2
Attempt to stabilize MacOS GA runner caused by QEMU / Colima / Docker…
reta May 29, 2024
0c2269a
Pass parent filter to inner hit query (#13770)
heemin32 May 30, 2024
3982c78
Remove conflicting static method from Metadata.Custom interface (#13869)
shiv0408 May 30, 2024
a2a42d2
Fix flaky test S3BlobStoreRepositoryTests.testRequestStats (#13887)
msfroh May 30, 2024
8a24b99
Revert "Pass parent filter to inner hit query (#13770)" (#13896)
heemin32 May 30, 2024
4ef3f52
Pass parent filter to inner hit query (#13903)
heemin32 May 31, 2024
e6991dd
13776: allow adding query parameters to RequestOptions (#13777)
oliverlockwood May 31, 2024
32ad5da
fix flaky #5364 (#13910)
sarthakaggarwal97 May 31, 2024
6535806
Fix negative scores returned from `multi_match` query with `cross_fie…
msfroh May 31, 2024
1586276
Revert "Remove deprecated constant META_FIELDS_BEFORE_7DOT8 (#13860)"…
cwperks May 31, 2024
331c0cd
Fix NPE on restore searchable snapshot (#13911)
bugmakerrrrrr May 31, 2024
cd5eacd
Update the developer guide to add Gradle Check Metrics Dashboard deta…
prudhvigodithi Jun 1, 2024
9946f61
[Remote Store] Adding ITs to ensure RemoteIndexPath file gets created…
astute-decipher Jun 3, 2024
44b9a8d
Add comment to XContentBuilder.toString() (#13809)
chishui Jun 3, 2024
628da68
Bump com.netflix.nebula.ospackage-base from 11.9.0 to 11.9.1 in /dist…
dependabot[bot] Jun 3, 2024
5857611
Painless: ensure type "UnmodifiableMap" for params (#13885)
r1walz Jun 3, 2024
0acc03d
Bump japicmp plugin version (#13940)
shiv0408 Jun 3, 2024
ca6047a
[Derived Field] Dynamic FieldType inference based on random sampling …
rishabhmaurya Jun 3, 2024
7c4d5e7
[DerivedField] object type support in mappings and new settings for d…
rishabhmaurya Jun 3, 2024
67e5974
Update gradle config for develocity rebranding (#13942)
andrross Jun 3, 2024
ec73849
Bump actions/checkout from 3 to 4 (#13935)
dependabot[bot] Jun 3, 2024
6eafd0b
Add DCO workflow (#13970)
prudhvigodithi Jun 4, 2024
90a7668
Revert "Optimize remote state stale file deletion (#13131)" (#13969)
reta Jun 4, 2024
cd811b6
[Tiered Caching] Additional ITs for cache stats (#13655)
peteralfonsi Jun 4, 2024
12b5c82
Another attempt to stabilize MacOS GA runner caused by QEMU / Colima …
reta Jun 5, 2024
43ba307
[Remote Routing Table] Initial commit for RemoteRoutingTableService s…
himshikha Jun 5, 2024
062e834
Shorten PR template checklist (#13979)
andrross Jun 5, 2024
3f6e3dd
COMPAT locale provider will be removed in a future release (#13988)
akolarkunnu Jun 5, 2024
f839055
Add release notes for 1.3.17 (#14013)
Divyaasm Jun 6, 2024
c3ae7b1
[Remote Cluster State] Remote state interfaces (#13785)
soosinha Jun 6, 2024
59238dd
Optimize remote state stale file deletion (#13995)
shiv0408 Jun 6, 2024
144418f
Adds counter metrics for leader and follower check failures (#12439)
gargharsh3134 Jun 6, 2024
69107ed
[Remote Routing Table] Initial commit for index routing table manifes…
himshikha Jun 6, 2024
adca083
[Remote Store] Add checks to skip remote uploads after shard is clos…
shourya035 Jun 6, 2024
9905416
A documentation issue, used CONTRIBUTING.md instead of DEVELOPER_GUID…
akolarkunnu Jun 6, 2024
b059129
Bump HdrHistogram to 2.2.2 and move the dependency version to version…
LantaoJin Jun 6, 2024
4996809
[Remote Store] Add support to disable flush based on translog reader …
shourya035 Jun 6, 2024
948dbbd
Add capability to disable source recovery_source for an index (#13590)
navneet1v Jun 6, 2024
e392ded
Update checkpoint from remote nodes replicas (#13888)
gbbafna Jun 6, 2024
b936688
Revert "COMPAT locale provider will be removed in a future release (#…
reta Jun 6, 2024
30ef23f
Fix double invocation of postCollection when MultiBucketCollector is …
jed326 Jun 6, 2024
91aefe8
Query insights exporters implementation (#12982)
ansjcy Jun 6, 2024
9ed651e
[DerivedField] Support DerivedField object type and integration with …
rishabhmaurya Jun 6, 2024
a343055
[Caching] Move cache removal notifications outside lru lock (#14017)
sgup432 Jun 6, 2024
d8fa606
Revert "Update checkpoint from remote nodes replicas (#13888)" (#14056)
ansjcy Jun 6, 2024
1d3ab4a
Add X-Opaque-Id to search request metadata for query insights (#13374)
ansjcy Jun 7, 2024
f2b465a
Make recovery action retry timeout configurable (#14022)
gbbafna Jun 7, 2024
87b4f55
Update checkpoint from remote nodes replicas (#13888) (#14062)
gbbafna Jun 7, 2024
b782aff
Update to Apache Lucene 9.11.0 (#14042)
reta Jun 7, 2024
d50e167
Query-level resource usages tracking (#13172)
ansjcy Jun 7, 2024
d0dd137
Mute all flaky IndicesRequestCacheIT tests (#14077)
andrross Jun 7, 2024
a1a31af
Implementation of RemoteWritableEntity for objects to uploaded to rem…
soosinha Jun 8, 2024
a9b74d4
Upload blob from input stream (#13836)
soosinha Jun 8, 2024
3e14e97
Retaining the old constructors for classes marked as API changed as p…
gargharsh3134 Jun 9, 2024
14cb7a1
Make remote seeding a low priority upload (#14096)
gbbafna Jun 10, 2024
be2dfd4
Implement missing methods for EncryptedBlobStore and EncryptedBlobCon…
skumawat2025 Jun 10, 2024
6411365
Adds support to provide tags with value in Gauge metric (#13994)
Gaganjuneja Jun 10, 2024
ac05be8
Move Remote Store Migration from DocRep to GA (#14100)
gbbafna Jun 10, 2024
7c0dc4e
Fix flaky test IndicesRequestCacheIT.testDeleteAndCreateSameIndexShar…
kkewwei Jun 10, 2024
9ad422b
Retaining old constructor of MasterService class to maintain compatib…
gargharsh3134 Jun 10, 2024
6293ce3
fix concurrent modification issue in thread context (#14084)
ansjcy Jun 10, 2024
70b4ca3
Add recovery chunk size setting (#13997)
astute-decipher Jun 10, 2024
a74cc47
Create serde utility for Writable classes (#14095)
soosinha Jun 10, 2024
dbe63a0
Add remote state publication transport call (#13835)
soosinha Jun 10, 2024
0801140
Bump com.azure:azure-core-http-netty from 1.12.8 to 1.15.1 in /plugin…
dependabot[bot] Jun 10, 2024
8329e2d
Small fix in jvmStats test (#14075)
lukas-vlcek Jun 10, 2024
257a82e
Bump tim-actions/get-pr-commits from 1.1.0 to 1.3.1 (#14126)
dependabot[bot] Jun 10, 2024
589e751
Merge branch 'opensearch-project:main' into issue-12958
parv0201 Jun 10, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG-3.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- Fix 'org.apache.hc.core5.http.ParseException: Invalid protocol version' under JDK 16+ ([#4827](https://github.com/opensearch-project/OpenSearch/pull/4827))
- Fix compression support for h2c protocol ([#4944](https://github.com/opensearch-project/OpenSearch/pull/4944))
- Don't over-allocate in HeapBufferedAsyncEntityConsumer in order to consume the response ([#9993](https://github.com/opensearch-project/OpenSearch/pull/9993))
- Java high-level REST client bulk() is not respecting the bulkRequest.requireAlias(true) method call ([#12958](https://github.com/opensearch-project/OpenSearch/pull/14136))

### Security

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,9 @@ static Request bulk(BulkRequest bulkRequest) throws IOException {
parameters.withRefreshPolicy(bulkRequest.getRefreshPolicy());
parameters.withPipeline(bulkRequest.pipeline());
parameters.withRouting(bulkRequest.routing());
if (bulkRequest.requireAlias() != null) {
parameters.withRequireAlias(bulkRequest.requireAlias());
}
// Bulk API only supports newline delimited JSON or Smile. Before executing
// the bulk, we need to check that all requests have the same content-type
// and this content-type is supported by the Bulk API.
Expand Down Expand Up @@ -232,6 +235,10 @@ static Request bulk(BulkRequest bulkRequest) throws IOException {
metadata.field("_source", updateRequest.fetchSource());
}
}

if (action.isRequireAlias()) {
metadata.field("require_alias", action.isRequireAlias());
}
metadata.endObject();
}
metadata.endObject();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1299,4 +1299,61 @@ public void testMultiTermvectors() throws IOException {
}
}
}

public void testBulkWithRequireAlias() throws IOException {
{
String indexAliasName = "testindex-1";

BulkRequest bulkRequest = new BulkRequest(indexAliasName);
bulkRequest.requireAlias(true);
bulkRequest.add(new IndexRequest().id("1").source("{ \"name\": \"Biden\" }", XContentType.JSON));
bulkRequest.add(new IndexRequest().id("2").source("{ \"name\": \"Trump\" }", XContentType.JSON));

BulkResponse bulkResponse = execute(bulkRequest, highLevelClient()::bulk, highLevelClient()::bulkAsync, RequestOptions.DEFAULT);

assertFalse("Should not auto-create the '" + indexAliasName + "' index.", indexExists(indexAliasName));
assertTrue("Bulk response must have failures.", bulkResponse.hasFailures());
}
{
String indexAliasName = "testindex-2";

BulkRequest bulkRequest = new BulkRequest();
bulkRequest.requireAlias(true);
bulkRequest.add(new IndexRequest().index(indexAliasName).id("1").source("{ \"name\": \"Biden\" }", XContentType.JSON));
bulkRequest.add(new IndexRequest().index(indexAliasName).id("2").source("{ \"name\": \"Trump\" }", XContentType.JSON));

BulkResponse bulkResponse = execute(bulkRequest, highLevelClient()::bulk, highLevelClient()::bulkAsync, RequestOptions.DEFAULT);

assertFalse("Should not auto-create the '" + indexAliasName + "' index.", indexExists(indexAliasName));
assertTrue("Bulk response must have failures.", bulkResponse.hasFailures());
}
{
String indexAliasName = "testindex-3";

BulkRequest bulkRequest = new BulkRequest(indexAliasName);
bulkRequest.add(new IndexRequest().id("1").setRequireAlias(true).source("{ \"name\": \"Biden\" }", XContentType.JSON));
bulkRequest.add(new IndexRequest().id("2").setRequireAlias(true).source("{ \"name\": \"Trump\" }", XContentType.JSON));

BulkResponse bulkResponse = execute(bulkRequest, highLevelClient()::bulk, highLevelClient()::bulkAsync, RequestOptions.DEFAULT);

assertFalse("Should not auto-create the '" + indexAliasName + "' index.", indexExists(indexAliasName));
assertTrue("Bulk response must have failures.", bulkResponse.hasFailures());
}
{
String indexAliasName = "testindex-4";

BulkRequest bulkRequest = new BulkRequest();
bulkRequest.add(
new IndexRequest().index(indexAliasName).id("1").setRequireAlias(true).source("{ \"name\": \"Biden\" }", XContentType.JSON)
);
bulkRequest.add(
new IndexRequest().index(indexAliasName).id("2").setRequireAlias(true).source("{ \"name\": \"Trump\" }", XContentType.JSON)
);

BulkResponse bulkResponse = execute(bulkRequest, highLevelClient()::bulk, highLevelClient()::bulkAsync, RequestOptions.DEFAULT);

assertFalse("Should not auto-create the '" + indexAliasName + "' index.", indexExists(indexAliasName));
assertTrue("Bulk response must have failures.", bulkResponse.hasFailures());
}
}
}
Loading