Issue while creating Vertex Centric Index on edge property. #3965
-
Janusgraph version => 0.6.1 I am trying to create vertex centric index(es) on existing edge properties.
Is there a cleaner and more graceful way to do this? I tried searching for similar issue but everywhere the solutions mention the closing of transactions as a mandatory step but if that is the case then this seems like a bug as the official documentation does not mention it explicitly anywhere. Moreover, it essentially means that you have to stop reads and writes on graph while doing reindexing which itself can take sometime to finish. Any help is appreciated. [UPDATE] : |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
I think it is mentioned there, but not very prominent and also not very descriptive. The code listing in the indexing chapter start with: graph.tx().rollback() //Never create new indexes while a transaction is active We should probably mention that this also means that all other JanusGraph instances should be stopped before as otherwise another instance could create a new transaction in parallel. I created an issue specifically for this: #3974. Not sure how much it helps you, but if you can somehow avoid the need for reindexing in the first place, then you save yourself a lot of trouble. So, I'd always try to create all indexes directly in the same management transaction in which new vertex labels or property keys are created as JanusGraph can then directly enable the index. |
Beta Was this translation helpful? Give feedback.
Let me try to summarize my understanding of this:
This leads me to the following steps for index operations: