Dropping a graph or a portion of a graph
drop() hangs in the Gremlin console.
Dropping a graph or a portion of a graph such as some vertices can hang based on errors in logged/unlogged or causes error depending on logged/unlogged DSE database batches. A method to resolve the problem is to DROP TABLE or TRUNCATE the underlying DSE database tables storing graph data.
The data for a graph is stored in <graph_name>.<vertex_label>_p
and
<graph_name>.<vertex_label>_e
. For example, recipe
data stored in a graph food
will be food.recipe_p
and
food.recipe_e
.
In some cases, additional steps must be taken to delete a graph. A graph consists of three
DSE database keyspaces: <graph_name>
, <graph_name>_system
,
and <graph_name>_pvt
. All three keyspaces must be deleted, with
cqlsh
if necessary, to completely delete the graph.
cqlsh
commands:cqlsh> delete from dse_system.shared_data where dataspace = 'Cluster'
and valid_until = 13814000-1dd2-11b2-0000-000000000000
and namespace = 'system' and name = '<graph_name>';
cqlsh> update dse_system.shared_data set last_updated = now() where dataspace = 'Cluster';
Shared_data
is not normally manually updated. However, this
procedure can be used in the case of a node failure during a graph provisioning
operation.