ids.store-name=titan_ids should not be required after migration Titan to JanusGraph
This issue and a fix was originally proposed by @rafatuita with PR #843. This issue is to track the bug, and the fix is superseded by PR #1005.
Recreate scenario:
- Start Titan 1.0.0 quick start distribution
- Create a graph with Titan 1.0.0
graph = TitanFactory.build().
set('storage.backend', 'cassandra').
set('storage.cassandra.keyspace', 'titan').
open()
graph.io(graphson()).readGraph('data/tinkerpop-modern.json')
graph.traversal().V().valueMap(true).toList()
graph.close()
- Open graph with JanusGraph 0.2.0 without
graph.titan-versionwill throw an exception.
// attempt to open without titan version throws exception
graph = JanusGraphFactory.build().
set('storage.backend', 'cassandrathrift').
set('storage.cassandra.keyspace', 'titan').
open()
// Need to set configuration value: root.graph.titan-version
// including titan version will open
graph = JanusGraphFactory.build().
set('storage.backend', 'cassandrathrift').
set('storage.cassandra.keyspace', 'titan').
set('graph.titan-version', '1.0.0').
open()
graph.traversal().V().valueMap(true).toList()
graph.close()
// afterwards, attempt to open without titan version still throws exception
graph = JanusGraphFactory.build().
set('storage.backend', 'cassandrathrift').
set('storage.cassandra.keyspace', 'titan').
open()
// Need to set configuration value: root.graph.titan-version
With Issue #418, graph.titan-version=1.0.0 is set, ids.store-name=titan_ids is stored in the global configuration. Because of this, it is already known that the database was migrated from Titan, thus graph.titan-version=1.0.0 is no longer required, although it does not hurt to include it.
@pluradj it looks good, sums up the issue, however, I'd just change keyspace from set('storage.cassandra.keyspace', 'foo') to set('storage.cassandra.keyspace', 'titan'), even though you're forcing it as foo. Just to keep it as consistent as possible with the real world scenario. thanks.
fixed with pr #1005