diff options
author | arkady-e1ppa <arkady-e1ppa@yandex-team.com> | 2024-05-15 11:32:40 +0300 |
---|---|---|
committer | arkady-e1ppa <arkady-e1ppa@yandex-team.com> | 2024-05-15 11:50:50 +0300 |
commit | b10957798b82d3f8946c6d773acb1b1212ec3166 (patch) | |
tree | b94bbad32298fde22ea8a744ac131839f95d06cf /contrib/python/matplotlib/py2/src/mplutils.cpp | |
parent | cad16b70aaaf4edfd5a8d28db6b81dcfc1903575 (diff) | |
download | ydb-b10957798b82d3f8946c6d773acb1b1212ec3166.tar.gz |
YT-21502, YT-21634: AresDNSResolver refactor
There is quite a bit of diff, so here goes the explanation:
1) interations with c-ares and epoll from ctor/dtor were moved to separate functions so that logical steps are clearer.
2) Same logical separation has been done to ResolverThread routine and some other functions (like, making OnRequestTimeout handler an actual function with human-readable name).
3) Now AresDnsResolver resembles ActionQueue much more in following ways:
3.1) We have a mechanism of shutting down the queue itself. It prevents situations when someone is still overloading resolver queue during the shutdown making thread delay
the shutdown for quite a bit. This logic also allows us to have an easy way of knowing that we have been shut down outside of resolver thread.
3.2) We ensure thread is running before we submit the task. We expect this to slightly improve reactivity of the first task but generally this change is not very needed.
3.3) ResolverThread now always cancels promises if it was stopped. Previously, some of the requests were set with errors, which was quite misleading.
3.4) ResolverThread no longer attempts to drain the entire queue if it was unlucky enough to observe a empty queue previously.
4) When cancelling promises we also cancel their timeout cookies thus we no longer trigger timeouts of already cancelled requests.
Changes 3.3 and 3.4 should ensure reactivity of processing requests and should completely prevent situations when ResolverThread is stuck on processing queue events without looking at c-ares "ready-to-be-executed" callbacks which would otherwise timeout.
fcebf3922e63570e1f82204e902d89859c0cbfe7
Diffstat (limited to 'contrib/python/matplotlib/py2/src/mplutils.cpp')
0 files changed, 0 insertions, 0 deletions