refactor: compute service info request pacing from fresh clock reads - #1895
Conversation
|
Thanks for contributing! A quick note: this project is in the process of moving from LGPL-2.1 to Apache 2.0, see #1835. By continuing with this pull request you agree that this new contribution is offered under Apache 2.0. This notice does not affect your previous contributions. If you would like to consent to relicensing those as well, please post the consent statement on #1835; silence is never treated as consent for past work. If offering this contribution under Apache 2.0 does not work for you, no hard feelings; reply with the exact phrase |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1895 +/- ##
=======================================
Coverage 99.87% 99.87%
=======================================
Files 33 33
Lines 3910 3911 +1
Branches 568 568
=======================================
+ Hits 3905 3906 +1
Misses 3 3
Partials 2 2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Summary
Restructures the
ServiceInfo.async_requestpolling loop the same way #1888 restructured the registration probe loop: wait-firstif/continueshape, a fresh clock read at the top of each cycle, and deadline arithmetic in place of the carriednow/next_/lasttrio. This is the last structural item from the tenth audit's inventory (#1835).Details
async_check_servicewithout being coupled to it. A shared pacing primitive was considered and rejected: the two loops differ in termination (probe count vs deadline/completion), cadence (fixed schedule vs adaptive jitter) and wake condition (engine notify vs the info's own futures), so extraction would be a callback-shaped abstraction bigger than the three lines it saves, with bound-method indirection in a Cythonized module.current_time_millis()call per query sent, in a loop whose iterations are separated by 25 to 1000 ms waits; no per-packet or per-record path changed and nothing ininfo.pxdis touched.Test plan
REQUIRE_CYTHON=1rebuild: 518 passed