Repository navigation
Conversation
bnaecker
commented
Oct 18, 2024
- Add generation numbers to the collection of oximeter producers, and assign the currrent generation to each producer as it is registered.
- Modify the refresh method to first take the generation number before starting to list current producers. Then use that to avoid pruning producers that are new since we started refreshing our list.
- Fixes test failed in CI: integration_tests::metrics::test_metrics #6895 and possibly test failed in CI: test_oximeter_reregistration #6901
- Add generation numbers to the collection of oximeter producers, and assign the currrent generation to each producer as it is registered. - Modify the refresh method to first take the generation number before starting to list current producers. Then use that to avoid pruning producers that are _new_ since we started refreshing our list. - Fixes #6895 and possibly #6901
|
I'd really like a close review on this one. It is extremely difficult to trigger this flaky behavior, since we need to start a server pretending to be Nexus; interrupt a request to refresh the producer list; and concurrently register a new producer as the same time. The test would then assert that we've not pruned that concurrently-registered producer. I spent most of the day trying and failing to test this, but could not come up with an approach that reliably triggers the bug. Given that we're trying to reduce test flakes, I'm very hesitant to add a new test that would itself be flaky. I think I've got the logic on bumping the generation numbers correctly, anytime we modify the map of producers, but I could definitely use other, more experienced eyes. |
|
@jgallagher, @davepacheco and I spent a bit of time yesterday talking about this change, and we ultimately decided to close it unmerged and make a more significant change to the interfaces between Nexus and The bug this was intended to address comes about because there are two ways Taking a step back, what we're trying to do here is sync a changing set from Nexus to
There are probably others, and they all have tradeoffs. Today we're doing both 2 and 3. Instead, we've decided to settle just on 2: This has some tradeoffs. First, the benefits are that it's very simple; the amount of work is constant and very predictable; it's easy to test and actually reduces the number of API calls in the system. That's because we're removing the one where Nexus notifies The downsides of the other approaches seemed more problematic. Having Nexus push the data means a new background task and a new interface from Nexus to |