ElasticsearchでSearchRequestBuilderのsetSizeとaddSortを併用した際に、
ConcurrentModificationExceptionが発生しています。
実装側でソートすれば要求を満たせるため、緊急で困っているわけでないのですが、
もし他の回避方法や同様の事象に遭遇した方がいらっしゃっいましたら情報をいただきたいです。
【バージョン】
elasticsearch 5.1.1
【発生する状況】
秒間200回程度リクエスト時
setSizeとaddSortを併用した時
【発生しない時】
秒間リクエストが10程度で少ない時
setSize、もしくはaddSortのどちらかしか使ってない時
【実装(scala)】
searchRequestBuilder.setQuery(myQuery).addSort("end_at", SortOrder.DESC).setSize(200).execute().actionGet
java.util.ConcurrentModificationException: null
[info] java.util.ConcurrentModificationException: null
[info] at java.util.ArrayList$Itr.checkForComodification(ArrayList.java:901)
[info] at java.util.ArrayList$Itr.next(ArrayList.java:851)
[info] at org.elasticsearch.search.builder.SearchSourceBuilder.writeTo(SearchSourceBuilder.java:266)
[info] at org.elasticsearch.common.io.stream.StreamOutput.writeOptionalWriteable(StreamOutput.java:706)
[info] at org.elasticsearch.action.search.SearchRequest.writeTo(SearchRequest.java:337)
[info] at org.elasticsearch.transport.TcpTransport.buildMessage(TcpTransport.java:1093)
[info] at org.elasticsearch.transport.TcpTransport.sendRequest(TcpTransport.java:949)
[info] at org.elasticsearch.transport.TransportService.sendRequestInternal(TransportService.java:520)
[info] at org.elasticsearch.transport.TransportService.sendRequest(TransportService.java:465)
[info] at org.elasticsearch.action.TransportActionNodeProxy.execute(TransportActionNodeProxy.java:51)
[info] at org.elasticsearch.client.transport.TransportProxyClient.lambda$execute$0(TransportProxyClient.java:59)
[info] at org.elasticsearch.client.transport.TransportClientNodesService.execute(TransportClientNodesService.java:231)
[info] at org.elasticsearch.client.transport.TransportProxyClient.execute(TransportProxyClient.java:59)
[info] at org.elasticsearch.client.transport.TransportClient.doExecute(TransportClient.java:345)
[info] at org.elasticsearch.client.support.AbstractClient.execute(AbstractClient.java:403)
[info] at org.elasticsearch.action.ActionRequestBuilder.execute(ActionRequestBuilder.java:80)
[info] at org.elasticsearch.action.ActionRequestBuilder.execute(ActionRequestBuilder.java:54)
[info] at org.elasticsearch.action.ActionRequestBuilder.get(ActionRequestBuilder.java:62)