Issue with Elasticsearch 6.4 refresh policy on IndexRequest

Hello,

I'm indexing an ES 6.4 index in this way:

cluster.getRestClient().index(new IndexRequest(INDEX_NAME, TYPE_NAME, cacheId).source(objCache.getIndexDocument(), XContentType.JSON), cluster.getRequestOptions());

This works perfectly. But when I add the refresh policy:

cluster.getRestClient().index(new IndexRequest(INDEX_NAME, TYPE_NAME, cacheId).source(objCache.getIndexDocument(), XContentType.JSON).setRefreshPolicy(RefreshPolicy.WAIT_UNTIL), cluster.getRequestOptions())

All threads get stuck. Our web application remains unresponsive and we have to shutdown tomcat 8.5.32. Not sure if this is a bug, or if this policy must not be used with an IndexRequest.

It's just 1 ES node with this index settings:
"index.number_of_shards" = 1
"index.number_of_replicas" = 0
"index.refresh_interval" = 10000
cluster.getRequestOptions = RequestOptions.DEFAULT.toBuilder().build()

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.