elastic-transport-python icon indicating copy to clipboard operation
elastic-transport-python copied to clipboard

Setting "sniff_before_requests=True" leads to repeatedly retrieving fail sniff tasks during requests

Open jackatls opened this issue 2 months ago • 0 comments

sorry my english is poor

in elastic_transport/_async_transport.py

when sniff_before_requests=True,sniff function call is not wrapped in a try-catch block, which causes exceptions from task.result to propagate outward. Image

Image

If last sniff task return a timeout exception,this sniff(False) function will repeatedly retrieving failed sniff task Exception and never recover

and I observed other place using the func will wrap it with try catch

Image

jackatls avatar Sep 10 '25 02:09 jackatls