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
When using quarkus (with quarkus-dapr), quarkus devmode does a (somewhat) full application restart when the code of the application has changed.
The way this is implemented there currently implemented causes problems, since the WorkflowRuntime instance is not correctly recycled, so we have stray instances of CDI beans still connected to a non-stopped WorkflowRuntime. While I was trying to fix this, I ran into two problems, somewhat related to #1727 and #1631.
When calling WorkflowRuntime.close(), dapr-java blocks, since it seems that the order of the shutdown is wrong (even after applying fix(durabletask): detect shutdown and break gRPC worker loop #1727).
Currently this.closeSideCarChannel(); is called before this.worker.close(); which blocks until the close timeout hits. When i reverse the order this problem goes away. I don't know if that would break other stuff, but locally this seems to work fine
WorkflowRuntimeBuilder doesn't allow a full rebuild of the WorkflowRuntime. So when using the builder to create a new WorkflowRuntime, the channel it tries to use doesn't actually work at all (at least i could not make it work, it's probably some deep connection to how the quarkus restart works). If i reset WorkflowRuntimeBuilder.instance before calling build() again, everything works as expected.
I guess the easiest way to fix this would be to allow resetting the WorkflowRuntimeBuilder.instance from the outside? I
Describe the proposal
When using quarkus (with quarkus-dapr), quarkus devmode does a (somewhat) full application restart when the code of the application has changed.
The way this is implemented there currently implemented causes problems, since the WorkflowRuntime instance is not correctly recycled, so we have stray instances of CDI beans still connected to a non-stopped WorkflowRuntime. While I was trying to fix this, I ran into two problems, somewhat related to #1727 and #1631.
Currently
this.closeSideCarChannel();is called beforethis.worker.close();which blocks until the close timeout hits. When i reverse the order this problem goes away. I don't know if that would break other stuff, but locally this seems to work fineWorkflowRuntime. So when using the builder to create a newWorkflowRuntime, the channel it tries to use doesn't actually work at all (at least i could not make it work, it's probably some deep connection to how the quarkus restart works). If i resetWorkflowRuntimeBuilder.instancebefore callingbuild()again, everything works as expected.I guess the easiest way to fix this would be to allow resetting the WorkflowRuntimeBuilder.instance from the outside? I