-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Go to "permanent error mode" if ChannelExecutor throws exception #3293
Comments
I do think it tends to make sense to catch and log the exception, since propagating the exception will probably only cause additional failures and we know the current stack does not depend on the result of the call (since the execution is not guaranteed to be complete when drain returns.) I don't think we should throw in a test environment; that's likely to produce confusion. Instead, you can inject a "exception handler" that is passed the exception. Normally, it would simply log. In tests it could save the exception and we can add an |
Not sure if you meant injecting the exception handler to |
FYI, I have been looking at consolidateing our executors (we have many) including the channel exec. If you make a change before I send out mine, please cc me. |
I'm fine with going into a "permanent error mode" if we get an exception with ChannelExecutor. Although the implementation will need to be very simple. |
@zhangkun83, assigning this to you since it seemed you were really interested in getting this done; feel free to unassign/reassign. |
It is now discovering legitimate errors in some tests that need to be resolved first. Follow progress at grpc#3293.
#4152 disabled the added panic mode. It doesn't delete it, but leaves it non-functional. We discovered pre-existing tests that had failures cause by exitIdleMode scheduling a timer, which can trigger Thread creation. The timer is to schedule IDLE_TIMEOUT, which is enabled by default to 30 minutes. In certain test environments, Thread creation is black-listed and throws an exception. Previously the exception was caught and logged, but otherwise things worked fine for the test; the test would not last long enough such that the broken IDLE_TIMEOUT would matter. I thus disabled panic mode so that we can fix up those tests before re-enabling. These tests would all be using InProcessTrasport, and since the recent #4139 it is now possible to pass your own ScheduledExecutorService. These tests could be fixed by passing a fake service of some sort, like |
It is now discovering legitimate errors in some tests that need to be resolved first. Follow progress at #3293.
As mentioned in discussion in #3288, it's questionable only catching instead of throwing exceptions in
ChannelExecutor
. Should we throw regardless or should we only log in production and throw in test evn?The text was updated successfully, but these errors were encountered: