You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is a race condition in the SDK that occurs when there are only scheduled tasks and no components and when the integration is running as a service and when you ctrl-C the integration.
When there are no components , the executor go routine is never spawned. The executor thread keeps the wait group alive until the last line of Shutdown() so the integration can shutdown properly. Without the executor, as soon as the last scheduled component shuts down, the wait group is released. This is fine under normal circumstances because Shutdown() is supposed to be called by the integration main() routine when control returns from Run(). But when you ctrl-C, the SDK calls Shutdown() automatically but it occurs in the thread that is handling the interrupt. So without components, the Shutdown() call can end up running in parallel with the main thread which is exiting. The main thread often will win which means Shutdown() doesn't complete and the integration doesn't gracefully shutdown.
The text was updated successfully, but these errors were encountered:
There is a race condition in the SDK that occurs when there are only scheduled tasks and no components and when the integration is running as a service and when you ctrl-C the integration.
When there are no components , the executor go routine is never spawned. The executor thread keeps the wait group alive until the last line of
Shutdown()
so the integration can shutdown properly. Without the executor, as soon as the last scheduled component shuts down, the wait group is released. This is fine under normal circumstances becauseShutdown()
is supposed to be called by the integrationmain()
routine when control returns fromRun()
. But when you ctrl-C, the SDK callsShutdown()
automatically but it occurs in the thread that is handling the interrupt. So without components, theShutdown()
call can end up running in parallel with the main thread which is exiting. The main thread often will win which meansShutdown()
doesn't complete and the integration doesn't gracefully shutdown.The text was updated successfully, but these errors were encountered: