elasticapm/transport: specific shutdown handling for http transport#2085
elasticapm/transport: specific shutdown handling for http transport#2085xrmx merged 2 commits intoelastic:mainfrom
Conversation
568c0ba to
20d51c0
Compare
|
It looks like the tests that replicates the submission timeout is flaky on windows: |
Honestly, I've been extremely tempted to remove our windows support entirely. I don't think anyone uses it, and the majority of our flakey tests have been on windows. (You can easily search for some of our other tests we skip on windows due to flakiness.) |
20d51c0 to
08136b4
Compare
We have a race condition at http transport shutdown where our atexit handler is racing against urllib3 ConnectionPool weakref finalizer. Having the urllib3 finalizer called before atexit would lead to have our thread hang waiting for send any eventual queued data via urllib3 pools that are closed. Force the creation of a new PoolManager so that we are always able to flush.
08136b4 to
25c4f9e
Compare
This time the problem was the test itself :) |
…lastic#2085) We have a race condition at http transport shutdown where our atexit handler is racing against urllib3 ConnectionPool weakref finalizer. Having the urllib3 finalizer called before atexit would lead to have our thread hang waiting for send any eventual queued data via urllib3 pools that are closed. Force the creation of a new PoolManager so that we are always able to flush.
…2085) We have a race condition at http transport shutdown where our atexit handler is racing against urllib3 ConnectionPool weakref finalizer. Having the urllib3 finalizer called before atexit would lead to have our thread hang waiting for send any eventual queued data via urllib3 pools that are closed. Force the creation of a new PoolManager so that we are always able to flush.
What does this pull request do?
We have a race condition at http transport shutdown where our atexit handler is racing against urllib3 ConnectionPool weakref finalizer. Having the urllib3 finalizer called before atexit would lead to have our thread hang waiting for send any eventual queued data via urllib3 pools that are closed.
Force the creation of a new PoolManager so that we are always able to flush.
Related issues
Closes #1975