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 5 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 103 in pkg/controller/ads/dns.go
pkg/controller/ads/dns.go#L99-L103
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 122 in pkg/controller/ads/dns.go
pkg/controller/ads/dns.go#L122
Check warning on line 127 in pkg/controller/ads/dns.go
pkg/controller/ads/dns.go#L124-L127
Check warning on line 138 in pkg/controller/ads/dns.go
pkg/controller/ads/dns.go#L131-L138
Check warning on line 149 in pkg/controller/ads/dns.go
pkg/controller/ads/dns.go#L149
Check warning on line 152 in pkg/controller/ads/dns.go
pkg/controller/ads/dns.go#L152
Check warning on line 187 in pkg/controller/ads/dns.go
pkg/controller/ads/dns.go#L187
Check warning on line 197 in pkg/controller/ads/dns.go
pkg/controller/ads/dns.go#L195-L197
Check warning on line 213 in pkg/controller/ads/dns.go
pkg/controller/ads/dns.go#L213
Check warning on line 220 in pkg/controller/ads/dns.go
pkg/controller/ads/dns.go#L220
Check warning on line 229 in pkg/controller/ads/dns.go
pkg/controller/ads/dns.go#L229