Skip to content
This repository was archived by the owner on Jul 18, 2024. It is now read-only.
This repository was archived by the owner on Jul 18, 2024. It is now read-only.

JanusGraphVertex added remains in the Graph DB if property already exist #74

@SarthakGhosh16

Description

@SarthakGhosh16

Description

AIM is remove the ghost vertex which is formed which does not consists of all the properties desired since the code error out.

Below snippet calls the function where vertex is added with the properties

Screenshot 2019-03-13 at 6 50 18 PM

Calling function acceptRecord(record) throws an error when Property already exists which is unique and it is trying to add the same Property (key,value).

     Eg: Emp1 -> has properties Age: 40, EID: 123, Phone: xxxx
     EID is unique property
     Emp2 -> Age: 41, EID: 123, Phone: xxyx

Since EID already exists, the below code throws an error but the
JanusGraphVertex v = graphTransaction.addVertex(vertexLabel); has already been added which never gets deleted and leaves a ghost vertex.

Screenshot 2019-03-13 at 6 50 06 PM

Will changing the block to try catch work plus using graphTransaction.rollback() or v.remove(), to delete the vertex in the catch block

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions