Skip to content

Enable QueryCache by default#786

Merged
bradh352 merged 2 commits intoc-ares:mainfrom
bradh352:dnscacheon
Jun 17, 2024
Merged

Enable QueryCache by default#786
bradh352 merged 2 commits intoc-ares:mainfrom
bradh352:dnscacheon

Conversation

@bradh352
Copy link
Member

The query cache should be enabled by default. This will help with determining proper timeouts for #736. It can still be disabled by setting the ttl to 0. There should be no negative consequences of this in real-world scenarios since DNS is based on the TTL concept and upstream servers will cache results and not recurse based on this information anyhow. DNS queries and responses are very small, this should have negligible impact on memory consumption.

Fix By: Brad House (@bradh352)

@bradh352 bradh352 merged commit 4248c64 into c-ares:main Jun 17, 2024
@bradh352 bradh352 deleted the dnscacheon branch June 17, 2024 15:02
ClifHouck added a commit to ClifHouck/envoy that referenced this pull request Mar 3, 2025
In version 1.31.0 c-ares enabled its query cache feature by default.
See c-ares/c-ares#786 .
This subverted test expectations that each query would be run in the
same way. This commit turns it off again in the c-ares dns impl by
default.  Adds a test to check that query cache is indeed off.

Adds a bit of addtional safety around handling TTLs in c-ares dns impl and
test code.

In PendingTimerEnable test a resolver address is now passed, otherwise
c-ares returns an error immediately. The number of expected timeouts is
also different because starting in version 1.32.0 c-ares now manages it's
own timeout expectations past the first timeout.
See c-ares/c-ares#794

Signed-off-by: Clif Houck <me@clifhouck.com>
ClifHouck added a commit to ClifHouck/envoy that referenced this pull request Mar 3, 2025
In version 1.31.0 c-ares enabled its query cache feature by default.
See c-ares/c-ares#786 .
This subverted test expectations that each query would be run in the
same way. This commit turns it off again in the c-ares dns impl by
default.  Adds a test to check that query cache is indeed off.

Adds a bit of addtional safety around handling TTLs in c-ares dns impl and
test code.

In PendingTimerEnable test a resolver address is now passed, otherwise
c-ares returns an error immediately. The number of expected timeouts is
also different because starting in version 1.32.0 c-ares now manages it's
own timeout expectations past the first timeout.
See c-ares/c-ares#794

Signed-off-by: Clif Houck <me@clifhouck.com>
ClifHouck added a commit to ClifHouck/envoy that referenced this pull request Mar 10, 2025
In version 1.31.0 c-ares enabled its query cache feature by default.
See c-ares/c-ares#786 .
This subverted test expectations that each query would be run in the
same way. This commit turns it off again in the c-ares dns impl by
default.  Adds a test to check that query cache is indeed off.

Adds a bit of addtional safety around handling TTLs in c-ares dns impl and
test code.

In PendingTimerEnable test a resolver address is now passed, otherwise
c-ares returns an error immediately. The number of expected timeouts is
also different because starting in version 1.32.0 c-ares now manages it's
own timeout expectations past the first timeout.
See c-ares/c-ares#794

Signed-off-by: Clif Houck <me@clifhouck.com>
ClifHouck added a commit to ClifHouck/envoy that referenced this pull request Mar 14, 2025
In version 1.31.0 c-ares enabled its query cache feature by default.
See c-ares/c-ares#786 .
This subverted test expectations that each query would be run in the
same way. This commit turns it off again in the c-ares dns impl by
default.  Adds a test to check that query cache is indeed off.

Adds a bit of addtional safety around handling TTLs in c-ares dns impl and
test code.

In PendingTimerEnable test a resolver address is now passed, otherwise
c-ares returns an error immediately. The number of expected timeouts is
also different because starting in version 1.32.0 c-ares now manages it's
own timeout expectations past the first timeout.
See c-ares/c-ares#794

Signed-off-by: Clif Houck <me@clifhouck.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant