theia-trace-extension icon indicating copy to clipboard operation
theia-trace-extension copied to clipboard

Call TSP endpoint to close an experiment when closing it in the UI

Open bhufmann opened this issue 2 years ago • 1 comments

With this it's possible to close an experiment on the server. Upon reception of the command the server can dispose allocated resources hence the client doesn't need them anymore.

This change follows the TSP update provided by: https://github.com/eclipse-cdt-cloud/trace-server-protocol/pull/95

Fixes #1024

It needs https://github.com/eclipse-cdt-cloud/tsp-typescript-client/pull/90 to compile.

Signed-off-by: Bernd Hufmann [email protected]

bhufmann avatar Nov 02 '23 17:11 bhufmann

There is on issue with this approach to close the experiment, because it introduces a state in the server and it becomes stateful. For example, if the UI client close an experiment and a CLI client is running an analysis, the analysis will fail. Vice versa, it a cli client close the experiment while the UI client is actually analyzing the experiment, it will fail.

More over, the Trace Compass server, generates row IDs for Timegraph and XY data providers, that are different after closing and reopening a trace. So, if the UI client opens the experiment and a Timegraph view and then the CLI client closes the experiment, even though, the experiment is re-opened when the UI client queries the Timegraph data provider again, the IDs to fetch row data are different and the query will result in empty graph. The UI client would have to close the view and re-open the view to make it work again.

So, to support closing of experiments and release back-end resources, concurrent queries, ongoing queries as well as IDs have to generated correctly.

bhufmann avatar Nov 06 '23 14:11 bhufmann