JanusGraph / JanusGraph/janusgraph

Delete property and add same name property in one transaction cant delete index data

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

Description

janusgraph 3.0 (hbase 1.2.6 + elasticsearch 6.3)

i have a vertex in graph ,es index like this:

"entityId": "PERSON_c3fc06c422d0418e72734d4bac011352ac91da7b_AA1"
"PER_NAME": [
"name1"
]

"entityId" is unique and i update "PER_NAME" by java like this:

String entityId = "PERSON_c3fc06c422d0418e72734d4bac011352ac91da7b_AA1";
List> list =
trans.traversal().V().has("entityId",entityId).properties("PER_NAME").toList();
Vertex v = trans.traversal().V().has("entityId",entityId).next();
for(Property p : list) {
p.remove();
v.property("PER_NAME","name1");
break;
}
trans.commit();

i cant find property "PER_NAME"->"name" by api, but i can find it in elasticsearch like this:

"entityId": "PERSON_c3fc06c422d0418e72734d4bac011352ac91da7b_AA1",
"PER_NAME": [
"name",
"name1"
]

Contributor guide

Open the contributing guide

Research direction

Start with the transaction flow shown in the report: remove the existing PER_NAME property, add the same property name, and commit. Compare the committed API result with the Elasticsearch index for the vertex, focusing on why the removed value remains indexed. Done means the old value is absent from Elasticsearch after commit and the API and index agree.

Written by the indexing model from the issue text.

Assessment

Tech stack
elasticsearch, java
Domain
databases, search
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.