-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Cached items get removed when upstream fetch is unsuccessful #4254
Comments
@agneevX, hello. The responses are cached for a TTL value they had so that the upstream server won't be queried until the response expires. If you have the "Optimistic caching" enabled, the last response should only be returned one more time. In any case the expired cache items are removed if those couldn't be resolved again so I would say this is the intended behavior. Did my answer clarified the logic? |
I do have Optimistic Caching enabled. I don't think this behavior is right, it should still serve expired queries rather than deleting items it could not get a reply to. Has this behavior changed recently? While I'm using DNS-over-HTTPS resolvers now, this was not the case before. |
@agneevX, well, you're right. This is a bug, we'll fix it soon. |
Thanks @EugeneOne1 as always 👍 |
Merge in DNS/dnsproxy from 4254-fix-optimistic to master Updates AdguardTeam/AdGuardHome#4254. Squashed commit of the following: commit 90f3467 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Feb 7 18:17:21 2022 +0300 proxy: imp docs again commit 010a02c Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Feb 7 18:16:38 2022 +0300 proxy: imp code commit f6e31fa Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Feb 7 18:08:45 2022 +0300 proxy: imp docs commit a50ba57 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Feb 7 17:33:55 2022 +0300 proxy: fix lint commit 4288ccb Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Feb 7 17:26:38 2022 +0300 proxy: make optimistic actually optimistic
@agneevX, latest edge build should fix the optimistic cache behavior. Could you please check if it now responds regardless to the internet connection status? |
While I'm not able to test this currently, I'll reach out if there's an issue once I'm able to do so. Thanks again! |
Merge in DNS/dnsproxy from 4254-fix-optimistic to master Updates AdguardTeam/AdGuardHome#4254. Squashed commit of the following: commit 90f3467 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Feb 7 18:17:21 2022 +0300 proxy: imp docs again commit 010a02c Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Feb 7 18:16:38 2022 +0300 proxy: imp code commit f6e31fa Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Feb 7 18:08:45 2022 +0300 proxy: imp docs commit a50ba57 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Feb 7 17:33:55 2022 +0300 proxy: fix lint commit 4288ccb Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Feb 7 17:26:38 2022 +0300 proxy: make optimistic actually optimistic
This is the AdGuard Home Remote app @gspannu. |
Is it the Rocket Science app or some other one? |
Yes, it's that one (I'm the creator 😄) |
Merge in DNS/adguard-home from 4254-fix-optimistic to master Updates AdguardTeam#4254. Squashed commit of the following: commit 652e2c2 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Feb 7 18:55:34 2022 +0300 all: upd proxy
Prerequisites
Issue Details
Issue Details
It seems that cached records get deleted when an upstream query is unsuccessful, after the cached query is served.
I lost at internet at 5:16:29 PM, so when the query was made one second later, a cached query was served.
At 5:36:31, when the internet was back up already, the query was fetched from upstreams, instead of from the cache.
However I'd say this requires some more testing.
Additional Information
I remember v0.107.0 serving cached records for an infinite amount of time when upstreams were unreachable. This is why actually the network was functional even though I had misconfigured upstreams, funny story!
The text was updated successfully, but these errors were encountered: