Reputation: 443
I am using Neo4J in Docker. Despite doing a major delete operation, the store size of the graph seems to increase.
I would appreciate if someone could tell me why this is. Thanks!
Upvotes: 0
Views: 393
Reputation: 7478
It comes from how Neo4j store data.
There is a node store (ie a file) and every node takes a fixed size. So when you delete a node, the corresponding record in the file is cleaned, but the file still has the same size.
After some times, Neo4j can reused this node's id to avoid to have a big 'empty' file.
So it's normal that your datastore size don't dicreased.
Moreover, everytime you perform an action on a data (create, update or delete), the modification is saved into the transaction logs.
And that's why your datastore size increases.
There is a policy for this log retention that you can configure, and the default one is to keep all the transaction of the last X days (I don't remember the number). Cheers
Upvotes: 1