wiedld opened a new pull request, #12086: URL: https://github.com/apache/datafusion/pull/12086
## Which issue does this PR close? Closes #. We are occasionally seeing a thread panic `"entered unreachable code: SpawnedTask was cancelled unexpectedly"` in our server logs. This is because the "unreachable" is actually reachable. ## Rationale for this change The existing unreachable assumes that no polling will occur after the runtime begins a shutdown. However, we found that while running datafusion in it's own runtime (own threadpool) we can actually hit this unreachable code -- when we start shutting down the executor and an internal poll still occurs. We think that how we are executing our datafusion queries is not uncommon, and therefore the shutdown behavior should not be causing a thread panic in datafusion. ## What changes are included in this PR? 1st commit = test to demonstrate the existing behavior (that we can reach the "unreachable"). 2nd commit = convert panic to error. ## Are these changes tested? Yes. ## Are there any user-facing changes? No API changes. Only the (happy) removal of thread panic from server logs. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
