public void awaitIndexToEnabled(final String indexName) {
try {
ManagementSystem.awaitGraphIndexStatus(graph_, indexName)
.status(SchemaStatus.ENABLED, SchemaStatus.REGISTERED).call();
final JanusGraphManagement mgmt = graph_.openManagement();
final JanusGraphManagement.IndexJobFuture indexFuture = mgmt
.updateIndex(mgmt.getGraphIndex(indexName),
SchemaAction.ENABLE_INDEX);
if (indexFuture != null) {
indexFuture.get();
}
mgmt.commit();
ManagementSystem.awaitGraphIndexStatus(graph_, indexName)
.status(SchemaStatus.ENABLED).call();
}
catch (final InterruptedException | ExecutionException e) {
logger_.error("Thread interrupted awaiting index " + indexName, e);
}
}
--
You received this message because you are subscribed to the Google Groups "JanusGraph users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to janusgraph-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/janusgraph-users/a25a6b00-d2eb-41e7-ac39-6737f62e967a%40googlegroups.com.
Hi Cody –
I run into this all the time. You essentially have to close all transactions AND all open Instances. Technically – you just need to close what I like to call stranded instances (Instances from other dead processes that will never ACK the Index commands) – but from what I can tell there is no way of separating them out. Once that is done registering and enabling work fine. It is a real PITA when dealing with index upgrades.
I would love to know if there is a better way.
Ben.
To view this discussion on the web visit
https://groups.google.com/d/msgid/janusgraph-users/CAH2Jy%3DEL4ysAiWFb97S6oe985C2XYAvP9o9iRhhdqLVsBaYBTg%40mail.gmail.com.
To unsubscribe from this group and stop receiving emails from it, send an email to janusgra...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/janusgraph-users/a25a6b00-d2eb-41e7-ac39-6737f62e967a%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "JanusGraph users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to janusgra...@googlegroups.com.