Replies: 3 comments 1 reply
-
This is a good idea for those who are using not bidirectional edges. In fact, in case you have an edge that connects vertices A to B, if you delete vertex B, ArcadeDB doesn't know it's pointing back to A through that edge because it was one way only from A to B. I suggest ALWAYS using bidirectional edges to keep the graph consistent unless you're looking for an optimization where you never cross the graph back from B to A and you take care of cascade deletion at the application level. So this command still makes sense for those cases and also in the cases where bugs would keep ghost edges for an unknown reason. I was thinking of a generic
Starting from the vertices instead of the edges allows checking both standard and lightweight edges. Using a bloom filter allows running this with a constant, pre-defined amount of RAM, no matter the database size. The cons are that there could be false positives and the edge not deleted on step (4). This is a minor drawback because it means edges without any vertices pointing to them would still be in the database causing no harm unless you query from the edges instead from vertices that is the most common use case. |
Beta Was this translation helpful? Give feedback.
-
Ok, the 1st version of this command is done, pushed in We need more tests by simulating more broken databases (not that easy). Executes an integrity check and in case of a repair of the database. This command analyzes the following things:
Syntax CHECK DATABASE [ TYPE <type-name>[,]* ] [ BUCKET <bucket-name>[,]* ] [ FIX ]
The command returns the integrity check report in one record. Examples
Official docs are updated with this new command: https://docs.arcadedb.com/#SQL-Check-Database. |
Beta Was this translation helpful? Give feedback.
-
Implemented further tests to break the database. it's all good, closing the issue |
Beta Was this translation helpful? Give feedback.
-
Sometimes we wind up with a dead in-vertex on an edge. This can happen due to an application error (e.g. a vertex is deleted that is an in-vertex of a uni-directional edge and the app does not also remove the edge) or in other situations. This results in a RecordNotFoundException when traversing a dead edge.
It would be helpful to have a command (or the ability) to have the database remove dead edges either by edge type or out-vertex type/edge type combination.
Beta Was this translation helpful? Give feedback.
All reactions