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:
graph.tx().rollback() //Never create new indexes while a transaction is active
mgmt = graph.openManagement()
time = mgmt.getPropertyKey('time')
battled = mgmt.getEdgeLabel('battled')
mgmt.buildEdgeIndex(battled, 'battlesByTime', Direction.BOTH, Order.desc, time)
mgmt.commit()
//Wait for the index to become available
ManagementSystem.awaitRelationIndexStatus(graph, 'battlesByTime', 'battled').call()
//Reindex the existing data
mgmt = graph.openManagement()
mgmt.updateIndex(mgmt.getRelationIndex(battled, "battlesByTime"), SchemaAction.REINDEX).get()
mgmt.commit()
graph.tx().rollback() //Never create new indexes while a transaction is active
mgmt = graph.openManagement()
time = mgmt.getPropertyKey('time')
battled = mgmt.getEdgeLabel('battled')
mgmt.buildEdgeIndex(battled, 'battlesByTime', Direction.BOTH, Order.desc, time)
mgmt.commit()
//Wait for the index to become available
ManagementSystem.awaitRelationIndexStatus(graph, 'battlesByTime', 'battled').call()
//Reindex the existing data
mgmt = graph.openManagement()
mgmt.updateIndex(mgmt.getRelationIndex(battled, "battlesByTime"), SchemaAction.REINDEX).get()
mgmt.commit()
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
karthikraju
karthikraju3mo ago
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'.
gremlin> graph.openManagement().printIndexes()
==>------------------------------------------------------------------------------------------------
Graph Index (Vertex) | Type | Unique | Backing | Key: Status |
---------------------------------------------------------------------------------------------------
byIdTypeAndName | Composite | false | internalindex | _id: INSTALLED |
| | | | type: INSTALLED |
| | | | name: INSTALLED |
byTypeAndName | Mixed | false | search | name: INSTALLED |
| | | | type: INSTALLED |
---------------------------------------------------------------------------------------------------
Graph Index (Edge) | Type | Unique | Backing | Key: Status |
---------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------
Relation Index (VCI) | Type | Direction | Sort Key | Order | Status |
---------------------------------------------------------------------------------------------------
featuresVehicleIndex | featuresVehicle | BOTH | primary | desc | INSTALLED |
gremlin> graph.openManagement().printIndexes()
==>------------------------------------------------------------------------------------------------
Graph Index (Vertex) | Type | Unique | Backing | Key: Status |
---------------------------------------------------------------------------------------------------
byIdTypeAndName | Composite | false | internalindex | _id: INSTALLED |
| | | | type: INSTALLED |
| | | | name: INSTALLED |
byTypeAndName | Mixed | false | search | name: INSTALLED |
| | | | type: INSTALLED |
---------------------------------------------------------------------------------------------------
Graph Index (Edge) | Type | Unique | Backing | Key: Status |
---------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------
Relation Index (VCI) | Type | Direction | Sort Key | Order | Status |
---------------------------------------------------------------------------------------------------
featuresVehicleIndex | featuresVehicle | BOTH | primary | desc | 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
paull8147
paull81473mo ago
Hello, you can register index with janusGraphManagement.updateIndex(janusGraphManagement.getGraphIndex(indexName), SchemaAction.REGISTER_INDEX) ManagementSystem.awaitRelationIndexStatus(graph, indexName).status(SchemaStatus.REGISTERED, SchemaStatus.ENABLED).call()
karthikraju
karthikraju3mo ago
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 server
paull8147
paull81473mo ago
did you commit after create index ?
karthikraju
karthikraju3mo ago
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:
13:26:58 INFO org.janusgraph.graphdb.database.management.GraphIndexStatusWatcher.call - Some key(s) on index byIdTypeAndName do not currently have status(es) [REGISTERED, ENABLED]: name=INSTALLED,_id=INSTALLED,type=INSTALLED
2024-09-12 18:56:58 13:26:58 INFO org.janusgraph.graphdb.database.management.GraphIndexStatusWatcher.call - Some key(s) on index byIdTypeAndName do not currently have status(es) [REGISTERED, ENABLED]: name=INSTALLED,_id=INSTALLED,type=INSTALLED`
13:26:58 INFO org.janusgraph.graphdb.database.management.GraphIndexStatusWatcher.call - Some key(s) on index byIdTypeAndName do not currently have status(es) [REGISTERED, ENABLED]: name=INSTALLED,_id=INSTALLED,type=INSTALLED
2024-09-12 18:56:58 13:26:58 INFO org.janusgraph.graphdb.database.management.GraphIndexStatusWatcher.call - Some key(s) on index byIdTypeAndName do not currently have status(es) [REGISTERED, ENABLED]: name=INSTALLED,_id=INSTALLED,type=INSTALLED`
I am currently trying to only register one index despite having three indexes created
paull8147
paull81473mo ago
can you print the schema plz graph.openManagement().printSchema()
karthikraju
karthikraju3mo ago
here's the schema
karthikraju
karthikraju3mo ago
UPDATE: The problem was with bad management of the sessions. Just separated the schema and index management scripts and it works.
Want results from more Discord servers?
Add your server