Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Refactor dns #1247
base: main
Are you sure you want to change the base?
Refactor dns #1247
Changes from 6 commits
35176df
4b08473
c41a2e1
72c9a32
b9fca75
b9ce631
f4397ea
c4cb113
44d5b2b
282fdda
2f054db
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
Check warning on line 54 in pkg/controller/ads/dns.go
pkg/controller/ads/dns.go#L53-L54
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks confusing with StartDnsResolver.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Already change function name
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure how does the ratelimiter effect, because in the dns pkg, it always run in order
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is not safe running async in separate routines,
think about this case:
t0: a resolveDomains thread
t1: another resolveDomains
If t1 is run before t0, even some step.The state machine would be broken
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you need convert after calling getPendingResolveDomain, why not directly return what you want
Check warning on line 102 in pkg/controller/ads/dns.go
pkg/controller/ads/dns.go#L98-L102
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
when will this thread exit?
Check warning on line 121 in pkg/controller/ads/dns.go
pkg/controller/ads/dns.go#L121
Check warning on line 148 in pkg/controller/ads/dns.go
pkg/controller/ads/dns.go#L148
Check warning on line 151 in pkg/controller/ads/dns.go
pkg/controller/ads/dns.go#L151
Check warning on line 186 in pkg/controller/ads/dns.go
pkg/controller/ads/dns.go#L186
Check warning on line 196 in pkg/controller/ads/dns.go
pkg/controller/ads/dns.go#L194-L196
Check warning on line 212 in pkg/controller/ads/dns.go
pkg/controller/ads/dns.go#L212
Check warning on line 219 in pkg/controller/ads/dns.go
pkg/controller/ads/dns.go#L219
Check warning on line 228 in pkg/controller/ads/dns.go
pkg/controller/ads/dns.go#L228