Closed Nielswps closed 1 year ago
I just fixed so that the started backend connections are added to startedBackendConnections
right as they are initialized (in case a user closes the program while the update components query runs) so we ensure all processes are closed.
When running queries I got some errors in the console because the used ports (activeEnginePorts
) were calculated from the available connections instead of the started connections, so i fixed that as well. Now i get no errors in the console.
There are no dangling processes now from my testing, so it seems to work!
We are still leaking backend connections though. If you add a break point to closeAllBackendConnections()
and check after clicking run all queries a bunch of times in e.g. the university example you can tell. The number of BackendConnection
s in startedBackendConnections
and availableBackendConnections
should be the same but when I test there are often just a couple of backends in availableBackendConnections
while there are many in startedBackendConnections
.
Once again PRs prove to be worthwhile. The changes make a lot of sense, thanks for pushing those fixes. I will open an issue on the leak :+1:
This PR fixes the issue of having dangling engine processes after exiting the GUI. This is done by keeping track of started connections in a separate list and still using a
BlockingQueue
for requesting connections. This removes the need for theQueryHandler
to keep track of the currently used connectionsCloses #111 and Closes #134