janusgraph
janusgraph copied to clipboard
Lucene index long overflow
- Version: 0.6.2
- Storage Backend: inmemory
- Mixed Index Backend: lucene
- Link to discussed bug: https://lists.lfaidata.foundation/g/janusgraph-users/topic/92505129#6571
- Expected Behavior: I would expect the queries to not throw any exceptions.
- Current Behavior:
A
PermanentBackendExceptionis thrown because of anArithmeticExceptionin theLuceneIndexclass. - Steps to Reproduce:
PropertiesConfiguration conf = ConfigurationUtil.loadPropertiesConfig("conf/test.properties");
JanusGraph graph = JanusGraphFactory.open(conf);
JanusGraphManagement m = graph.openManagement();
PropertyKey key = m.makePropertyKey("prop").dataType(Long.class).make();
m.buildIndex("propIndex", Vertex.class).addKey(key).buildMixedIndex("search");
m.commit();
graph.traversal()
.V()
.has("prop", P.neq(Long.MAX_VALUE))
.next();
graph.traversal()
.V()
.has("prop", P.inside(Long.MAX_VALUE, 0L))
.next();
graph.traversal()
.V()
.has("prop", P.outside(Long.MIN_VALUE, 0L))
.next();
With the following configuration:
gremlin.graph=org.janusgraph.core.JanusGraphFactory
storage.backend=inmemory
index.search.backend=lucene
index.search.directory=data/searchindex
The bug seems to happen for P.neq, P.inside and P.outside both with MIN_VALUE and MAX_VALUE.
One more example that seems to throw the same exception:
PropertiesConfiguration conf = ConfigurationUtil.loadPropertiesConfig("conf/test.properties");
JanusGraph graph = JanusGraphFactory.open(conf);
JanusGraphManagement m = graph.openManagement();
PropertyKey key = m.makePropertyKey("prop").dataType(Date.class).make();
m.buildIndex("propIndex", Vertex.class).addKey(key).buildMixedIndex("search");
m.commit();
graph.traversal()
.V()
.has("prop", P.inside(new Date(), new Date(Long.MIN_VALUE)))
.next();