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

Recursive resolution will not work if intermediate records cannot be cached #12

Open
barrucadu opened this issue Mar 2, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@barrucadu
Copy link
Owner

RFC 1035 says:

Zero values are interpreted to mean that the RR can only be used for the transaction in progress, and should not be cached.

Currently the only way intermediary RRs get used is by sticking them in the cache. So if an essential record has a TTL of zero, resolved will fail to make use of it: it will look up that record every time it needs it, and I wouldn't be surprised if this could cause an infinite loop in some cases.

I think the way to solve this is to have an additional transaction-local cache inside the SharedCache, which only stores RRs with a TTL of zero.

@barrucadu barrucadu added the bug Something isn't working label Mar 2, 2022
@barrucadu barrucadu linked a pull request Mar 4, 2022 that will close this issue
@barrucadu barrucadu removed a link to a pull request Mar 4, 2022
@barrucadu barrucadu changed the title Records with zero TTL will not work Recursive resolution will not work if intermediate records cannot be cached Mar 18, 2022
@barrucadu
Copy link
Owner Author

This isn't just a problem with 0-TTL records. If resolving a record requires more records to be cached than the cache can hold, it will get stuck in a loop.

So we do need a sort of request-local cache, in addition to the shared cache. The request-local cache would hold everything, with inserts pushing records of TTL > 0 into the shared cache.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant