I am currently trying to add a new relation index to a janusgraph instance (~1M nodes / edges)
graph.tx().rollback()
mgmt = graph.openManagement()
timestamp = mgmt.getPropertyKey('timestamp') // property timestamp already exist and some vertices already have this property
edgeLabel = mgmt.getEdgeLabel('edgeLabel') // edge label edgeLabel already exist and some edges already have this labelidx_edge=mgmt.buildEdgeIndex(edgeLabel, 'indexEdge', Direction.BOTH, Order.decr, timestamp)
mgmt.commit()
ManagementSystem.awaitRelationIndexStatus(graph, 'indexEdge', 'edgeLabel').call()
And this is where the troubles come. The index is stuck on INSTALLED. The last command gives me this error:
> RelationIndexStatusReport[succeeded=false, indexName='indexEdge', relationTypeName='edgeLabel', actualStatus=INSTALLED, targetStatus=[REGISTERED], elapsed=PT1M0.085S]
I made sure to rollback every open transaction and close any open instances before executing this query.
Do you know how this problem could be solved?
If I'm not mistaken, the number of already existing edges having the label 'edgeLabel' and the timestamp property should not impact the passage of the index from INSTALLED to REGISTERED, no?
Then, I figured that I should try deleting this index to try to install it fresh. Other problems appeared!
I wanted to first disable it then remove it.
I disabled it with
mgmt = graph.openManagement()
rindex = mgmt.getRelationIndex(mgmt.getRelationType('edgeLabel'), 'indexEdge')
mgmt.updateIndex(rindex, SchemaAction.DISABLE_INDEX).get()
mgmt.commit()
ManagementSystem.awaitRelationIndexStatus(graph, 'indexEdgeSlaveUpp', 'SLAVE_TREE->UPP').status(SchemaStatus.DISABLED).call()
which worked fine.
However, the actual delete step
mgmt = graph.openManagement()
i = mgmt.getRelationIndex(mgmt.getRelationType('SLAVE_TREE->UPP'), 'indexEdgeSlaveUpp')
mgmt.updateIndex(i, SchemaAction.REMOVE_INDEX)
mgmt.commit()
graph.tx().commit()
is executed without error nor exception
810160 [Thread-17] INFO org.janusgraph.graphdb.olap.job.IndexRepairJob - Found index indexEdge
810335 [Thread-19] INFO org.janusgraph.graphdb.olap.job.IndexRepairJob - Found index indexEdge
810445 [Thread-17] INFO org.janusgraph.graphdb.database.management.ManagementSystem - Index update job successful for [indexEdge[edgeLabel]]
but
shows that the index is still here and in the DISABLED state
Do you know what could be the cause of this?
Thanks in advance.
# Janusgraph 0.3.2 on Cassandra