-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Track and deduplicate in-flight requests to _get_state_for_groups
.
#10870
Conversation
More to follow when #10825 is ready.
e7fe187
to
a30042b
Compare
I'm going to add some more tests when #10825 is available so I can actually prove that things get deduplicated, but would like some thoughts on if this seems sensible. |
This reverts commit 363565e because a proper implementation is now in develop.
to introduce `approx_difference`.
|
||
d.callback(result) | ||
|
||
def test_duplicate_requests_deduplicated(self) -> None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test seems nuanced enough that it could use a docstring saying what the overall steps are that are happening.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added one; any good?
Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com>
Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems reasonable, thank you for the explanations!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes seem good! 👍 This has a failing sytest which I don't think I've seen before though.
This is the 2nd PR of a series (expected to have 4 PRs) to address #10301 .
Depends on #10825.
The general idea is that when requesting some state, we make use of existing queries that are already in-flight.
Those queries might only give us partial information, so we may have to use multiple, and we may even have to spawn our own (smaller) query for the leftover state.
Coming up later: