orientdb-studio icon indicating copy to clipboard operation
orientdb-studio copied to clipboard

Graph Editor does not refresh deleted V and E

Open StarCmd opened this issue 8 years ago • 5 comments

OrientDB Version: v2.2.16

Java Version: 1.7.0_67

OS: macOS 10.11.6

Expected behavior

Graph Studio should refresh as soon as a query is executed. Using Clear Canvas, is OK. But I don't understand why refreshing the Query does not refresh the Canvas ?

Actual behavior

Executing a query does not update the graph.

Steps to reproduce

From a new database, create 2 vertex and 1 edge using the Graph Editor (+ and link). Delete them using only Studio icons (trashcan) from the Browse panel. Go back from Browse to Graph Editor : it show erroneous Nodes & Edges count until request a Run Query. Anyway, the graph does not update and the 2 vertex and the edge are still visible.

nov-noe

noupdate

StarCmd avatar Apr 10 '17 08:04 StarCmd

Hi @StarCmd

the Graph Editor caches the results. When you come back the query is not executed. And each time you execute a query the result set is added to the Graph Editor and not replaced

wolf4ood avatar Apr 11 '17 10:04 wolf4ood

That make sense when you add things to the database. You show (select) what exist inside your database. I feel uncomfortable with the idea to leave interactive visual element that aren't anymore related to a physically database element ...

Either it's a (unsynchronized ) Graph Viewer, either a Graph Editor. The Query field accept a "CREATE VERTEX V" and draw it (add it) to the canvas. It also accept "DELETE VERTEX #33:3". However it does not remove the vertex from the canvas. What would be the purpose of an "Editor" capable to edit a Vertex that does not exist anymore.

It's really confusing. The cache is updated when elements are added (selected) or created. It should be updated when they are removed (that's work) AND deleted.

BTW Interface and Documentation should remove the ambiguity between those concepts. The + sign should be labeled "Create Vertex" as opposed to "Delete Vertex" both actions that modify the DB and "Add" opposed to "Remove" that modify the Canvas only.

In all cases, the Documentation should warn clearly about that.

StarCmd avatar Apr 11 '17 11:04 StarCmd

hi @StarCmd

the same can happen if you have a vertex in the Graph Editor and someone in another session delete it. How can Studio intercept that?

Studio cannot parse the query

DELETE VERTEX #33:3 and understand that you want to remove that vertex with a query.

That is why there are button helpers to do that within Studio.

wolf4ood avatar Apr 11 '17 11:04 wolf4ood

OK, I get a better understanding of what under the hood. Thanks for your remarks. This issues that is not really one may be close.

StarCmd avatar Apr 11 '17 11:04 StarCmd

@StarCmd

OrientDB has live queries that could allow this syncronization between the GraphEditor and the underlying database, but they are not supported over HTTP. I will leave this open as enhancement since it would be a cool feature.

Thanks

wolf4ood avatar Apr 11 '17 12:04 wolf4ood