Skip to content

Commit

Permalink
Add possibility to remove stale mixed index entries for given vertice…
Browse files Browse the repository at this point in the history
…s or edges

Continuation of JanusGraph#3022

Related to JanusGraph#1099

Signed-off-by: Oleksandr Porunov <alexandr.porunov@gmail.com>
  • Loading branch information
porunov committed Nov 20, 2022
1 parent ba90c0e commit 208a6a2
Show file tree
Hide file tree
Showing 3 changed files with 663 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 208a6a2

@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: 208a6a2 Previous: cc50720 Ratio
org.janusgraph.MgmtOlapJobBenchmark.runRemoveIndex 113.87539827949495 ms/op 116.01213089429174 ms/op 0.98
org.janusgraph.JanusGraphSpeedBenchmark.basicAddAndDelete 15049.376071604445 ms/op 18946.06915687976 ms/op 0.79
org.janusgraph.GraphCentricQueryBenchmark.getVertices 1610.7452989044816 ms/op 2109.7113285792266 ms/op 0.76
org.janusgraph.MgmtOlapJobBenchmark.runReindex 349.0627689989744 ms/op 429.82350948615385 ms/op 0.81
org.janusgraph.JanusGraphSpeedBenchmark.basicCount 289.9487903563681 ms/op 411.89673865570273 ms/op 0.70
org.janusgraph.CQLMultiQueryBenchmark.getNeighborNames 35754.239443239996 ms/op 48875.302951666665 ms/op 0.73
org.janusgraph.CQLMultiQueryBenchmark.getNames 35811.32713216333 ms/op 48071.20002993333 ms/op 0.74

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

Please sign in to comment.