JanusGraph / JanusGraph/janusgraph
Corrupted data after simultaneous vertex delete and edge creation
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 5.8k
- Forks
- 1.2k
- Avg merge
- 13h 53m
- Merged PRs (30d)
- 6
Description
Checked on janusgraph 0.2.0 and 0.3.0 (snapshot from 04.April.2018) on cassandra 3.11.1
This problem occurs on our environment, where by default we have 30 separate simultaneous connections to single janusgraph instance.
I was able to reduce the problem to simple reproducible scenario:
First, you need to connect to db (best empty) from *two* gremlin consoles (A and B) and proceed as follows:
**gremlin console A)**
```
g.addVertex("name", "A")
g.addVertex("name", "B")
g.tx().commit()
v = g.traversal().V().has("name", "A").next()
```
**gremlin console B)**
```
g.traversal().V().has("name", "A").drop()
g.tx().commit()
```
**gremlin console A)**
```
v.addEdge('TEST', g.traversal().V().has("name", "B").next())
g.tx().commit()
```
**AFTER this check corrupted data on any console:**
this will return "zombie" vertex
`g.traversal().V().has("name", "B").in()`
that is not on all vertices list:
`g.traversal().V()`
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the two-console Gremlin scenario against an empty JanusGraph instance using Cassandra 3.11.1, with vertex deletion in one connection and edge creation in the other. Trace the transaction and concurrent mutation behavior involved; done means the edge creation no longer leaves vertex B reachable through an incoming edge while absent from g.V().
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cassandra, java
- Domain
- databases, distributed-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100