Skip to content

Commit 689ebe1

Browse files
Skip refreshIndex in serverless mode to fix 404 on _refresh endpoint (#692)
* Skip refreshIndex in serverless mode to fix 404 on _refresh endpoint (#690) Signed-off-by: Sotaro Hikita <bering1814@gmail.com> * update CHANGELOG Signed-off-by: Sotaro Hikita <bering1814@gmail.com> --------- Signed-off-by: Sotaro Hikita <bering1814@gmail.com> Signed-off-by: Harsha Vamsi Kalluri <harshavamsi096@gmail.com> Co-authored-by: Harsha Vamsi Kalluri <harshavamsi096@gmail.com>
1 parent d4439ac commit 689ebe1

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
1515
- Remove unused MultiReaderIterator and multiReader method ([#667](https://github.com/opensearch-project/opensearch-hadoop/pull/667))
1616

1717
### Fixed
18+
- Fixed serverless mode writes failing with 404 on _refresh endpoint ([#692](https://github.com/opensearch-project/opensearch-hadoop/pull/692))
1819
- Fixed opensearch-spark-40 dependency license SHAs and added dependabot config for sql-40 module ([#688](https://github.com/opensearch-project/opensearch-hadoop/pull/688))
1920
- Fixed global refresh when using dynamic index patterns ([#686](https://github.com/opensearch-project/opensearch-hadoop/pull/686))
2021
- Fixed build failures when downloading Apache project dependencies (Hadoop, Hive, Spark) ([#595](https://github.com/opensearch-project/opensearch-hadoop/pull/595))

mr/src/main/java/org/opensearch/hadoop/rest/RestClient.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,12 @@ public void refresh(Resource resource) {
309309
}
310310

311311
public void refreshIndex(String index) {
312+
if (settings.getServerlessMode()) {
313+
if (LOG.isDebugEnabled()) {
314+
LOG.debug("Serverless mode - skipping refreshIndex (not supported in serverless)");
315+
}
316+
return;
317+
}
312318
execute(POST, index + "/_refresh");
313319
}
314320

0 commit comments

Comments
 (0)