Ensure ServiceInfo orders newest addresess first#1012
Merged
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1012 +/- ##
==========================================
- Coverage 99.76% 99.68% -0.08%
==========================================
Files 23 23
Lines 2504 2524 +20
Branches 409 412 +3
==========================================
+ Hits 2498 2516 +18
- Misses 3 5 +2
Partials 3 3
Continue to review full report at Codecov.
|
- In order to comply with rfc6762 section 10.2, cache flushed records expire 1s in the future. If a ServiceInfo request is made while the records are still in the cache and not yet expired, the first address would be returned which was the address that was about to be expunged from the cache. We now return the newest address first to reduce the risk consumers of ServiceInfo will try the old address. This effectively restores the behavior before 1s cache flush expire was added for callers that rely on this.
dca46fb to
17b12f3
Compare
chemelli74
approved these changes
Oct 22, 2021
chemelli74
left a comment
There was a problem hiding this comment.
Thx @bdraco , tested and working perfectly!
Member
Author
|
The project coverage is not actually decreased, we are not reporting python 3.6 coverage anymore, and will go away once we drop python 3.6 in #1009 |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In order to comply with rfc6762 section 10.2, cache flushed
records expire 1s in the future. If a ServiceInfo request is
made while the records are still in the cache and not yet expired,
the first address would be returned which was the address that
was about to be expunged from the cache. We now return the newest
address first to reduce the risk consumers of ServiceInfo will
try the old address.
This effectively restores the behavior before 1s cache flush
expire was added for callers that rely on this.
cc @chemelli74. This should fix the behavior you were seeing with shelly on ip change