amazon-archives / dynamodb-janusgraph-storage-backend

The Amazon DynamoDB Storage Backend for JanusGraph
Apache License 2.0
446 stars 99 forks source link

Creating Indexes for existing data. Index in INSTALLED #265

Closed sandeepdoctily closed 6 years ago

sandeepdoctily commented 6 years ago

Dear All,

I am trying to create the indexes with Janus Graph after I load the data into it. So there are already existing vertices and properties with data.

I created below vertices in the graph: gremlin> g.V().properties() ==>vp[name->sandeep] ==>vp[name->uday]

I am trying to create the indexes on the property "name" and it is getting stuck in "INSTALLED" state.

graph.tx().rollback() //Never create new indexes while a transaction is active mgmt = graph.openManagement() name = mgmt.getPropertyKey('name') mgmt.buildIndex('byNameComposite', Vertex.class).addKey(name).buildCompositeIndex() mgmt.commit()

//Wait for the index to become available mgmt.awaitGraphIndexStatus(graph, 'byNameComposite').call()

3589249 [gremlin-server-session-1] INFO org.janusgraph.graphdb.database.management.GraphIndexStatusWatcher - Some key(s) on index byNameComposite do not currently have status(es) [REGISTERED]: name=INSTALLED 3589709 [gremlin-server-worker-1] WARN org.apache.tinkerpop.gremlin.server.op.AbstractEvalOpProcessor - Script evaluation exceeded the configured threshold for request [RequestMessage{, requestId=40375b29-d180-4732-9816-24870fb1b3b1, op='eval', processor='session', args={gremlin=mgmt.awaitGraphIndexStatus(graph, 'byNameComposite').call(), session=ef0c3a0e-bef0-4a93-bc29-7869c1fd24db, bindings={}, manageTransaction=false, batchSize=64}}] java.util.concurrent.TimeoutException: Script evaluation exceeded the configured 'scriptEvaluationTimeout' threshold of 30000 ms or evaluation was otherwise cancelled directly for request [mgmt.awaitGraphIndexStatus(graph, 'byNameComposite').call()]

I have tried with the MIXED INDEXES also but with no luck. The index is getting stuck in INSTALLED state.

Let me know if you need any more data.

Please help me out. Any help is appreciated.

Thanks Sandeep

amcp commented 6 years ago

You are getting a timeout exception from gremlin server. you have to increase the timeout in your gremlin server configuration: https://github.com/awslabs/dynamodb-janusgraph-storage-backend/blob/master/src/test/resources/gremlin-server.yaml#L22

How long it will take the server to create your index may depend on the size of your graph, so I would start out with a generous timeout, and move forwards from there.

sandeepdoctily commented 6 years ago

Hi Alex

I have tried 10m timeout also but still the index is in INSTALLED.

AbstractEvalOpProcessor - Script evaluation exceeded the configured threshold for request [RequestMessage{, requestId=81a56728-f207-4bd3-9a6c-083dd2ea33cc, op=‘eval’, processor=‘session’, args={gremlin=mgmt.awaitGraphIndexStatus(graph, ‘byRegNumComposite’).status(SchemaStatus.REGISTERED).timeout(10, java.time.temporal.ChronoUnit.MINUTES).call(), session=d2c517f5-acf0-48c8-a760-6b79a93d6b5b, bindings={}, manageTransaction=false, batchSize=64}}] java.util.concurrent.TimeoutException: Script evaluation exceeded the configured ‘scriptEvaluationTimeout’ threshold of 600000 ms or evaluation was otherwise cancelled directly for request [mgmt.awaitGraphIndexStatus(graph, ‘byRegNumComposite’).status(SchemaStatus.REGISTERED).timeout(10, java.time.temporal.ChronoUnit.MINUTES).call()]

We think it is BUG.

udayth commented 6 years ago

BTW: the above was attempted on a graph which just has a handful of vertices and nodes.

udayth commented 6 years ago

FYI: we also opened a thread on Janusgraph users' Google group> https://groups.google.com/forum/#!topic/janusgraph-users/VpzAbUyolgw

anshulpathak commented 4 years ago

Hi Udayth,

Were you able to fix this issue? I am also facing same issue. Could you please share details if you are able to crack this.

Thanks Anshul

gibranparvez commented 4 years ago

Updates on this?

rogaha commented 4 years ago

same here