Skip to content

Commit 4c34b2a

Browse files
committed
Skip refreshIndex in serverless mode to fix 404 on _refresh endpoint (opensearch-project#690)
Signed-off-by: Sotaro Hikita <bering1814@gmail.com>
1 parent 9807b25 commit 4c34b2a

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

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)