JanusGraph / JanusGraph/janusgraph
Lucene index long overflow
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 5.8k
- Forks
- 1.2k
- Avg merge
- 13h 53m
- Merged PRs (30d)
- 6
Description
- 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 `PermanentBackendException` is thrown because of an `ArithmeticException` in the `LuceneIndex` class.
- Steps to Reproduce:
```java
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`.
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 with the LuceneIndex class and reproduce the issue using the supplied in-memory storage, Lucene configuration, and Long property queries. Check the P.neq, P.inside, and P.outside cases at Long.MIN_VALUE and Long.MAX_VALUE; done means these queries no longer throw PermanentBackendException or ArithmeticException.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- databases, search
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100