Skip to content

Commit

Permalink
Add possibility to remove mixed index entries
Browse files Browse the repository at this point in the history
Continuation of JanusGraph#3022

Related to JanusGraph#1099

Signed-off-by: Oleksandr Porunov <alexandr.porunov@gmail.com>
  • Loading branch information
porunov committed Nov 19, 2022
1 parent ba90c0e commit ac9f445
Show file tree
Hide file tree
Showing 4 changed files with 569 additions and 46 deletions.
8 changes: 4 additions & 4 deletions docs/advanced-topics/stale-index.md
Expand Up @@ -18,13 +18,13 @@ As for now there is the utility tool which may be used to fix permanent stale in
to fix permanent stale index entries.

`StaleIndexRecordUtil.forceRemoveVertexFromGraphIndex` can be used to force remove an index record for any vertex from
a graph index. Right now the limitations of this method is that it can be used with Composite indices only.
a graph index.
An example of using this method is below:
```java
// Let's say we want to remove non-existent vertex from a stale index.
// We will assume the next constraints:
// Vertex id is: `12345`
// Composite index name is: `nameAgeIndex`
// Index name is: `nameAgeIndex`
// There are two indexed properties: `name` and `age`
// Value of the name property is: `HelloWorld`
// Value of the age property is: `123`
Expand All @@ -41,7 +41,7 @@ StaleIndexRecordUtil.forceRemoveVertexFromGraphIndex(
12345L, // vertex id of the index record to be removed
indexRecordPropertyValues, // index record property values
graph,
"nameAgeIndex" // composite index name for which to remove the index record
"nameAgeIndex" // graph index name for which to remove the index record
);
```
For more in-depth information about usage of this tool see JavaDoc for `StaleIndexRecordUtil`.
For more in-depth information about usage of this tool as well as explanations of additional methods of this tool see JavaDoc for `StaleIndexRecordUtil`.

1 comment on commit ac9f445

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Benchmark

Benchmark suite Current: ac9f445 Previous: cc50720 Ratio
org.janusgraph.MgmtOlapJobBenchmark.runRemoveIndex 115.71917939281184 ms/op 116.01213089429174 ms/op 1.00
org.janusgraph.JanusGraphSpeedBenchmark.basicAddAndDelete 18282.868193503586 ms/op 18946.06915687976 ms/op 0.96
org.janusgraph.GraphCentricQueryBenchmark.getVertices 1972.746257447436 ms/op 2109.7113285792266 ms/op 0.94
org.janusgraph.MgmtOlapJobBenchmark.runReindex 406.24490545804196 ms/op 429.82350948615385 ms/op 0.95
org.janusgraph.JanusGraphSpeedBenchmark.basicCount 411.59745190352754 ms/op 411.89673865570273 ms/op 1.00
org.janusgraph.CQLMultiQueryBenchmark.getNeighborNames 47133.636273849996 ms/op 48875.302951666665 ms/op 0.96
org.janusgraph.CQLMultiQueryBenchmark.getNames 46782.799284216664 ms/op 48071.20002993333 ms/op 0.97

This comment was automatically generated by workflow using github-action-benchmark.

Please sign in to comment.