JanusGraph / JanusGraph/janusgraph

Unexpected result for indexed property

Open
#3,700 1 comment 0 reactions 0 assignees View on GitHub
kind/bug/possible
Dominant language
Java
Stars
5.8k
Forks
1.2k
Avg merge
13h 53m
Merged PRs (30d)
6

Description

We have the following query: g.E().hasId('pwrc-159kw-74l-1b8h4').inV().valueMap()
The result of the query is: {EntityId=[12], uid=[User:12], AccountId=[15]}
When I try to run the following: g.E().hasId('pwrc-159kw-74l-1b8h4').inV().valueMap('AccountId') I receive the {AccountId=[15]}. It is correct.
However when I run the following query: g.E().hasId('pwrc-159kw-74l-1b8h4').inV().valueMap('uid')
I receive the empty result {}
Also the following queries returns incorrect results:
g.E().hasId('pwrc-159kw-74l-1b8h4').inV().has('uid') - empty
gremlin> g.E().hasId('pwrc-159kw-74l-1b8h4').inV().hasNot('uid') - v[2203816]
![image](https://user-images.githubusercontent.com/56965286/230766111-b1fa76f9-bee5-4a73-b607-d9fb8d7a2a4d.png)

It is just reproduced for few vertexes of thousands vertexes we have in Graph.

The 'uid' property has the unique index 'byUniqueId' created. Is it possible that index was broken? However as it is graph index, we suppose it doesn't matter
![image](https://user-images.githubusercontent.com/56965286/230766142-54eb253d-8193-47ff-a9f6-6dc913278bcb.png)

Any ideas how to fix it?

Contributor guide

Open the contributing guide

Research direction

No source files or tests are named. Start by reproducing the listed Gremlin queries against the affected vertices and inspecting the unique index named byUniqueId; done means uid property retrieval and has/hasNot queries consistently agree with valueMap results.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
databases, distributed-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.