janusgraph icon indicating copy to clipboard operation
janusgraph copied to clipboard

ids.store-name=titan_ids should not be required after migration Titan to JanusGraph

Open pluradj opened this issue 8 years ago • 2 comments

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-version will 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 avatar Apr 16 '18 00:04 pluradj

@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.

rafatuita avatar Apr 16 '18 14:04 rafatuita

fixed with pr #1005

pluradj avatar May 29 '18 18:05 pluradj