Deletion of vertex does not properly delete attached edges in 2.2.15 #7118

Closed
uiterlix opened this Issue Jan 24, 2017 · 1 comment

Comments

Projects
None yet
2 participants
@uiterlix
Contributor

uiterlix commented Jan 24, 2017

OrientDB Version, operating system, or hardware.

2.2.15

Operating System

MacOSX

Expected behavior and actual behavior

Deletion of a vertex in 2.2.15 does not automatically lead to correct deletion of attached edges. An attempt to delete the edge afterwards results in a NullPointer.
Exception in thread "main" java.lang.NullPointerException at com.tinkerpop.blueprints.impls.orient.OrientGraphNoTx.removeEdgeInternal(OrientGraphNoTx.java:321) at com.tinkerpop.blueprints.impls.orient.OrientGraphNoTx.removeEdgeInternal(OrientGraphNoTx.java:292) at com.tinkerpop.blueprints.impls.orient.OrientEdge.remove(OrientEdge.java:382) at com.tinkerpop.blueprints.impls.orient.OrientBaseGraph.removeEdge(OrientBaseGraph.java:1094) at DeleteVertexTest.main(DeleteVertexTest.java:37)

Steps to reproduce the problem

The following code runs fine on 2.2.11 but gives the exception on 2.2.15.

`
public static void main(String[] args) {

	String url = "remote:localhost/test";
	String user = "root";
	String password = "root";
	int minPoolSize = 1;
	int maxPoolSize = 5;
	OrientGraphFactory factory = new OrientGraphFactory(url, user, password).setupPool(minPoolSize, maxPoolSize);
	
	Graph graph = factory.getNoTx();
	
    Vertex x = graph.addVertex(null);
    Vertex y = graph.addVertex(null);
    
    graph.addEdge(null, x, y, "connected_to");
    
    for (Vertex v : graph.getVertices()) {
        graph.removeVertex(v);
    }
    
    for (Edge e : graph.getEdges()) {
        System.out.println("e: " + e);
    }
    
    graph.shutdown();
    
    graph = factory.getNoTx();
    
    for (Edge e : graph.getEdges()) {
        graph.removeEdge(e);
    }
    
    graph.shutdown();
}

`

We've been using OrientDB for production for a while now, but it heavily worries me that such straightforward functionality breaks with a micro version.

@tglman

This comment has been minimized.

Show comment
Hide comment
@tglman

tglman Jan 24, 2017

Member

hi @uiterlix,

Yes this was a regression we introduced that slipped out of our test suite, with your test case was able to reproduce it and i fixed it and included the test case in our test suite.

Thank you for your clear submission.

Regards

Member

tglman commented Jan 24, 2017

hi @uiterlix,

Yes this was a regression we introduced that slipped out of our test suite, with your test case was able to reproduce it and i fixed it and included the test case in our test suite.

Thank you for your clear submission.

Regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment