janusgraph
janusgraph copied to clipboard
Clearly document shutting down other instances for index operations
This was originally discussed in #3965.
Describe the feature: Many posts on our mailing list, SO and so on contain the recommendation to make sure that no management transaction is open when performing index operations to make sure that index operations aren't hindered by dangling open instances, but this isn't described clearly in the docs.
The indexing docs currently mention that no other transaction should be open, but only in a code listing and also only really in a comment:
graph.tx().rollback() //Never create new indexes while a transaction is active
The docs should make it more clear how important that is and also that other JanusGraph instances shouldn't be running in parallel as they could otherwise open new transactions after this has been executed.
Describe a specific use case for the feature: Prevent users from running into a situation where an index isn't enabled only because some old management instance is still registered.
I also answered previously regarding this matter in the discussions here: https://github.com/JanusGraph/janusgraph/discussions/3195#discussioncomment-3595012
Users need to follow 2 requirements:
- No other parallel management transactions are running
- No JanusGraph ghost instances exist
If one of the above cases is false then the index won't be enabled no matter how long users await for the status change.
No other parallel management transactions are running
Yes, this is another confusing aspect in this. The docs currently talk about transactions in general which we should then also fix.
We should also document this for the ConfiguredGraphFactory when managing graphs as noted in #4440.