Edge Index stuck at Installed
I have a Janusgraph instance running 1.0.0 with scylladb storage and Elastic indexing. I am trying to follow the example for creating an index on one of my edges:
I am able to create the index, but it never reached the REGISTERED status.
ManagementSystem.awaitRelationIndexStatus(graph,'locatedAtByLabel','located_at').call()
returns:
RelationIndexStatusReport[succeeded=false, indexName='locatedAtByLabel', relationTypeName='located_at', actualStatus=INSTALLED, targetStatus=[REGISTERED], elapsed=PT1M0.081S]
no matter how long I wait.
I've tried the suggested fixes in this thread (https://groups.google.com/g/janusgraph-users/c/GfYM538KsTo) but haven't had any luck.8 Replies
I am facing the same problem.
I have setup a simple groovy script that creates the indexes.
I am sending it to the gremlin server through the python client.
The indexes are just stuck at 'INSTALLED'.
I tried doing
graph.openManagement().awaitGraphIndexStatus(graph, <indexName>).call()
directly in the gremlin server as well and even that gave the following error which continues until the timeout is complete:
The error message:
2024-09-12 17:07:45 11:37:45 INFO org.janusgraph.graphdb.database.management.GraphIndexStatusWatcher.call - Some key(s) on index byIdTypeAndName do not currently have status(es) [REGISTERED]: name=INSTALLED,_id=INSTALLED,type=INSTALLED
Hello, you can register index with
janusGraphManagement.updateIndex(janusGraphManagement.getGraphIndex(indexName), SchemaAction.REGISTER_INDEX)
ManagementSystem.awaitRelationIndexStatus(graph, indexName).status(SchemaStatus.REGISTERED, SchemaStatus.ENABLED).call()
I tried executing the first command on all the three indexes and for each of them, I am getting the following error:
The vertex or type is not associated with this transaction
I did close all transactions earlier, is that what's causing this issue?
let me restart and try again
Still getting the same error after restarting the serverdid you commit after create index ?
yes, I have
but everything happens in the same script, that is the creation of index happens first and immediately I am creating another management instance and trying out REGISTER_INDEX commands
I am getting the following error now:
I am currently trying to only register one index despite having three indexes created
can you print the schema plz
graph.openManagement().printSchema()
here's the schema
UPDATE:
The problem was with bad management of the sessions. Just separated the schema and index management scripts and it works.