-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
This issue is based on discussions in #392 and in https://groups.google.com/forum/#!topic/janusgraph-dev/hYFY-_nshyg (thanks @dpitera). To summarize the core graph factory API should support graph/index deletion with the expected result that keyspaces/tables/indices/etc. are dropped/deleted.
Currently storage and indexing backends implement deletion through Backend#clearStorage() and IndexProvider#clearStorage(), respectively, which is exposed at a higher level through JanusGraphCleanup#clear(). But existing delete implementations are not generally consistent with the expected behavior as it appears they were written to support the testing rather than production use case (JanusGraphCleanup#clear() documentation indicates that the method "is intended only for development and testing use"). For example the Cassandra implementations (CQL, Thrift, etc.) truncate instead of drop keyspaces, the HBase implementation deletes rows using an implementation that does not scale, and the Solr implementation does not appear to delete collections as would be expected. Also tests are missing across all storage/indexing backends to validate expected delete behavior.
The goal in addressing this issue should be to support dropping keyspaces/etc. while still maintaining the existing clearStorage implementations for testing. The latter is critical because it's been found that dropping keyspaces/tables during testing has a significant impact on performance (see #384 which showed truncation, among other updates, decreased runtime for the TinkerPop test suite in the CQL module from 15 hours to 3 hours).