I encountered a ElasticClient.execute method hang when I am trying to execute a lot of simultanios requests to elastic. I am using elastic4s-client-akka.
AkkaHttpClient uses akka stream source queue with backpressure overflow strategy. When we try to offer one element into queue and if inner buffers of the QueueSource are full the SourceQueue.offer return Future.failed. Then we cautch the exception with recoverWith method and try to invoke markDead method. But RequestState.host Promise cannot be completed at all because it will be completed in the queue stream later.
Is it a bug or expected behavior? Maybe it is better to crash ElasticClient.execute method when a queue is overflowed.
P.S. Sorry for my english and have a good day!
I encountered a
ElasticClient.executemethod hang when I am trying to execute a lot of simultanios requests to elastic. I am usingelastic4s-client-akka.AkkaHttpClientuses akka stream source queue with backpressure overflow strategy. When we try to offer one element into queue and if inner buffers of theQueueSourceare full theSourceQueue.offerreturnFuture.failed. Then we cautch the exception withrecoverWithmethod and try to invokemarkDeadmethod. ButRequestState.hostPromisecannot be completed at all because it will be completed in the queue stream later.Is it a bug or expected behavior? Maybe it is better to crash
ElasticClient.executemethod when a queue is overflowed.P.S. Sorry for my english and have a good day!