使用" DELETE VERTEX时,OrientDB不会立即删除所有顶点..." SQL语句

时间:2015-10-04 15:57:35

标签: orientdb

我在VehicleHistoryGraph数据库中创建了一个Message类型的顶点,并为其加载了50,000个此类型的顶点。

当我尝试使用此SQL语句一次删除所有顶点时 -

DELETE VERTEX MESSAGE

我收到意外错误,说某些顶点已被删除(但另一方面,我在加载后没有删除任何顶点)并且顶点不会按预期一次删除所有顶点(见下文)。

orientdb> connect remote:localhost/databases/VehicleHistoryGraph admin admin

 Connecting to database [remote:localhost/databases/VehicleHistoryGraph] with user 'admin'...OK
orientdb {db=VehicleHistoryGraph}> DELETE VERTEX MESSAGE

Error: com.orientechnologies.orient.core.exception.OCommandExecutionException: Error on execution of command: sql.select from Message

Error: java.lang.IllegalStateException: The elements #26:38028 has already been deleted

Error: com.orientechnologies.orient.core.exception.ORecordNotFoundException: The record with id '#26:38028' not found

Error: com.orientechnologies.orient.core.exception.ORecordNotFoundException: The record with id '#26:38028' not found

orientdb {db=VehicleHistoryGraph}> SELECT COUNT(@rid) FROM Message

----+------+-----
#   |@CLASS|COUNT
----+------+-----
0   |null  |13546
----+------+-----

1 item(s) found. Query executed in 1.538 sec(s).
orientdb {db=VehicleHistoryGraph}> DELETE VERTEX MESSAGE

Delete record(s) '11896' in 107.861000 sec(s).

orientdb {db=VehicleHistoryGraph}> SELECT COUNT(@rid) FROM Message

----+------+-----
#   |@CLASS|COUNT
----+------+-----
0   |null  |1820
----+------+-----

1 item(s) found. Query executed in 0.167 sec(s).

orientdb {db=VehicleHistoryGraph}> DELETE VERTEX MESSAGE

Delete record(s) '1820' in 6.320000 sec(s).

orientdb {db=VehicleHistoryGraph}>

出了什么问题?为什么?这是一个错误吗?

1 个答案:

答案 0 :(得分:0)

问题仍然存在吗?如果您尝试使用最新版本(从2.2.x版开始),则有2个有用的命令:

CHECK DATABASE(检查数据库的完整性。如果数据库包含图形,则检查其一致性)

REPAIR DATABASE(用于修复数据库)