question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Possible bug in Cache.addMessage

See original GitHub issue

If the message given to Cache.addMessage has 4 answers like this:

appP3N1.TLD.	1	IN	CNAME	appP3N1.S.TLD.
appP3N1.S.TLD.	1	IN	CNAME	appP3N1.Q.TLD.
appP3N1.Q.TLD.	1	IN	CNAME	Qserver02_c0.TLD.
Qserver02_c0.TLD.	86400	IN	A	10.0.4.12

I would expect that the returned SetResponse should have the type SetResponse.SUCCESSFUL. However due to the response being created inside the if branch for CNAME record, the returned value has the type SetResponse.CNAME. This causes Lookup.processResponse to follow the CNAME records through the cache rather than just returning the value immediately.

I believe that the response object needs to be created from the last answer rather than the first answer.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
jschewebbncommented, Jan 21, 2021

I’m referring to the initial query. As it stands right now, the query to the server is done, processResponse is returning a SetResponse with the type set to CNAME rather than SUCCESSFUL. This causes an unneeded search through the cache and the execution of the follow method.

0reactions
ibauersachscommented, Feb 2, 2021

Return which response directly? The Message coming in from the resolver is not the same as what is returned from the cache. I had a look at the stuff yesterday and it’s too convoluted to change for, as Noa correctly states, nothing. The long CNAME chains you’re referring to are an anomaly, and nobdy in their right mind would create a longer than 5-6 CNAMEs. Given BINDs popularity, I don’t think you’d get many responses that even go beyond the hard limit of 16.

I’m going to close this issue. If you’re up for a pull request though, I’ll certainly have a look.

Read more comments on GitHub >

github_iconTop Results From Across the Web

336734 - page load hangs with "Waiting for cache..." message
I have cleared cache, cookies, restarted computer. When this "waiting for cache" appears in the lower left black bar of the browser, my...
Read more >
[Cache] Create and edit message fail handling · Issue #129 ... - GitHub
After checking the code, found some detail is missing when handling create and edit message fail case. Current api behavior. addMessage.
Read more >
Full Text Bug Listing - WebKit Bugzilla
I set "Access-Control-Allow-Origin" header to "*" in server response to enable cross-domain requests. This works for XHR, but does not work for EventSource....
Read more >
Bug in Spring cache? Why list.addAll make an effection on the ...
Hi I met an really strange bug. The method list.addAll do change the return result in Spring caches. Let me be simple, the...
Read more >
com.lispworks.Manager
showBugFormLogs shows a list of the BugFormLogs , where each item is an error string, and allows you to open the associated log...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found