-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Spawn a task in
oximeter
to actually do the collection (#7097)
`oximeter` currently starts up a task for each producer. When their collection interval expires, that task directly makes an HTTP request to the producer to collect its data, _in-line_ in the same task. This can cause problems, especially if there are concurrent updates to the producer's address information. The main `oximeter` HTTP server will send a message to that task in that case, asking it to update its producer information, but that task might be off in lalaland making an HTTP request. This is particularly bad since that HTTP request may never complete -- the producer's address might be updated, so the old one is defunct, possibly forever! This commit addresses this by spawning a new task to actually run the collection itself. This keeps the first-level task alive and responsive, such that it can abort any previously-spawned collections if there are updates. We _also_ replace any existing task if a collection was explicitly requested, but we ignore existing collections (rather than spawning a new one) if the timer expires while one is already running. This resolves test flakes described in #6901.
- Loading branch information
Showing
6 changed files
with
518 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.