DGraph storage growing too much too fast

I’ve written a streaming graph solution to address requirements handed to me for a project. This means I end up adding/removing/updating nodes and edges in my containerized dGraph setup regularly.

I’ve noticed the storage requirement of DGraph continues to grow (and grow quickly) over time. Digging around, it seems others have experienced similar behavior. When asking about BadgerDB, the answer seems to be to set the NumVersionsToKeep to 1. But what about for DGraph? I can’t find a way to set this option in my docker compose / DGraph configuration.

I don’t want/need any notion of history in my graph instance. I only need the most recent data for nodes/edges.

Is there a way to tell DGraph to discard historical data? Thanks!

1 Like

Dgraph periodically marks old versions to be discarded to reclaim disk space. It doesn’t exist today, but we can look into adding a flag to give you control on the extent of how many versions to keep internally. Past versions are kept long enough to serve transactions that need to see it.