Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do we have two dns caches? #12762

Closed
cecille opened this issue Dec 9, 2021 · 7 comments
Closed

Do we have two dns caches? #12762

cecille opened this issue Dec 9, 2021 · 7 comments
Assignees
Labels

Comments

@cecille
Copy link
Contributor

cecille commented Dec 9, 2021

Problem

Looks like the case manager introduced one, and we also have one in the platform impl.

Proposed Solution

We should have one or even none - in the case of platform we might actually have three.

@turon
Copy link
Contributor

turon commented Jan 12, 2022

It would be helpful to add link references that jump to where the two implementations are in the code. Also, could extra clarification be added about why and how some platforms may have three mdns caches in the proposed solution? I believe the mention of three implementations is expanding on the problem, as platform packages such as avahi add a third cache implementation, but that is unclear in the bug description.

@cecille
Copy link
Contributor Author

cecille commented Jan 13, 2022

Third cache would be the internal cache in the platform impl (not always there - depends on the impl). If you were running avahi, the dns result would be cached in the avahi impl, the platform cache and the controller cache.

SDK cache impl is src/lib/dnssd/DnssdCache.h. It's instantiated in both CHIPDeviceController.cpp and Discovery_ImplPlatform.

see https://github.com/project-chip/connectedhomeip/blob/master/src/controller/CHIPDeviceController.h line 341 and
https://github.com/project-chip/connectedhomeip/blob/master/src/lib/dnssd/Discovery_ImplPlatform.cpp line 42.

If we're going to vote one off the island, the one in Discovery_ImplPlatform has the least utility IMO. Though perhaps I'm missing some context from the original author. See #11632

@holbrookt
Copy link
Contributor

@cecille seems like this could be needed for 1.0?

@cecille
Copy link
Contributor Author

cecille commented Feb 1, 2022

Could be - it's wasteful at the very least.

@woody-apple
Copy link
Contributor

Let's defer until we know this is required?

@andy31415 andy31415 self-assigned this Feb 24, 2022
@andy31415
Copy link
Contributor

Assigned to me as I believe I am touching this as part of mDNS resolution logic (I need to have a 'get best address' logic and the DNS caching is actually in the way in parts). Not working to really fix it, but it may be touched as a sideffect.

@andy31415
Copy link
Contributor

Removed caching.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants