JanusGraph / JanusGraph/janusgraph

JanusGraphTransaction#getVertex throws exception when vertex does not exist

Open
#1,415 7 comments 1 reaction 0 assignees View on GitHub
kind/bug/confirmed
Dominant language
Java
Stars
5.8k
Forks
1.2k
Avg merge
13h 53m
Merged PRs (30d)
6

Description

According to the javadocs this method should return null if the vertex does not exist, instead it throws an exception due to an assertion error in the guava cache:

java.lang.AssertionError: Should not happen: CacheLoader returned null for key 82931045.
at org.janusgraph.graphdb.transaction.vertexcache.GuavaVertexCache.get(GuavaVertexCache.java:84)
at org.janusgraph.graphdb.transaction.StandardJanusGraphTx.getVertex(StandardJanusGraphTx.java:394)

Contributor guide

Open the contributing guide

Research direction

Start with StandardJanusGraphTx.getVertex and follow the call into GuavaVertexCache.get, using the reported stack trace and nonexistent vertex case as the reproduction. Confirm the behavior against the getVertex javadocs; done means a missing vertex returns null instead of raising the Guava cache assertion.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
databases
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.