Im using neo4j 3.0.1 community, and i have a few GBs of data. Those data very quickly become outdated (like 2,3 times per day) and i have to create new data first, and then delete the old stuff (so at any point in time some data are available).
The problem is that neo4j doesnt reuse space from deleted nodes/relationships. Im using MATCH (n) WHERE condition DETEACH DELETE n
I can see that nodes are beeing deleted (their number is constant ~30M) but the size is growing (after 12 updates, size is almost exactly 12x bigger than it should be).
I found previous posts Neo4J database size / shrinking about store-utils but i would like to find a better solution.
I also found old question (from version 1.x) neostore.* file size after deleting millions node but it simply doesnt work like in the answer at least in my case.
There are some advices to delete all database files and just create a new one, but it would require the service to be stopped which shouldn't happen.
I also found some information that in order to reuse space you need to restart DB first, tried it as well and it didn't work.
Is there a way to effectively free/reuse space from deleted nodes/relationships ? Maybe i miss some configuration, or its available only in enterprise version?
EDIT:
Finally i had some time to test and i run scenario when data were refreshed a few times, restarting server a few times aswell. Test were made on neo4j 3.0.0 on windows 10 environment. The results are(not yet allowed to embeed images):
Each column presents storage size for further updates, blue line means neo4j server restart, and last column (separated with brown line) stands for size after running store-utils.
As desribed earlier, the size is growing pretty fast and against the documentation, restart doesn't help. Only store-utils helps (they clean files except neostore.nodestore.db) but it would be hard and messy solution to integrate store-utils to production solution.
Can anyone give me a hint why the storage is growing ?