-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
exception: make Ipv6Instance and Ipv4Instance not throw and remove some try catch pattern #16122
Merged
jmarantz
merged 35 commits into
envoyproxy:main
from
chaoqin-li1123:remove_dns_resolve_try
Jun 23, 2021
Merged
Changes from 1 commit
Commits
Show all changes
35 commits
Select commit
Hold shift + click to select a range
8dba38f
refactor
6f8c113
refactor
c564998
remove exception from dns_impl
99b85ba
clean up
85cff42
clean up
5b44d5f
use release assert
b12f57c
use getAddreOrDie
9bfc32e
clean up template in .cc
7c73ff8
move error handling to the begining of ctor
979079b
refactor
77bc948
avoid repeating code
d4636ae
add comments
42b9817
fix typo
e932b99
use ctors that throw in main thread and clean up
42c5432
remove dns resolve try
b1a2675
refactor pipe instance ctor
59c1329
main thread assertion int helper
f4b4aac
add comment
010fb7c
refactor throw on error
33579ac
clean up
1f574db
...
59224a0
add assertion to OrDie
abc66de
assert worker thread for OrDie
50d1cfe
clean up
91e6823
resolve conflict
c32a936
Merge branch 'main' of https://github.com/envoyproxy/envoy into remov…
6aa0985
clean up
cc13e11
clean up
a6b1cab
clean up
d2dde83
clean up
f686b73
add comments
cee9834
reverse raw try
e564aff
add comment
83d2b39
add comment
c498b05
add comment
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
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.
add ASSERT(!isMainThread)
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.
Do you mean ASSERT(isMainThread)?
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.
But this is also called in worker thread. We can use OrDie version in worker thread everywhere, but that would change the behavior of envoy.
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.
Ah sorry, yes. I meant ASSERT(isMainThread()). We should only be calling something that can throw if we are in the main thread, right?
Now, if this is used in worker thread, it should be a version that cannot throw, rather than this one. That's the main point of this change, right? We may have to propagate errors up stack and change some call-sites.
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.
Can you add a comment like:
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.
Thanks, comment added.
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.
Maybe I'm missing something here, but it seems we're not improving anything if we're still either throwing or dying on the working thread?
Can you maybe explain the context of this PR so I can understand scope better. I.e. what's the long term game plan here.
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 there's a lot less throwing and catching done in worker threads now. The only exception I think is the catch in place needed to deal with unexpected issues in the fuzz test.