Dgraph automatically generates dgraph_index, will the data be stored here?

I found that the dgraph_index file gradually became larger and filled up the disk. My alpha configuration:
--postings /export/dgraphdata/p200 --wal /export/dgraphdata/w200 >alpha200out.file 2>&1 &

Hi tss,

I never heard about a folder or file called dgraph_index. All indexing, data, caches and so on, are stored in Badger format (.sst, .vlog) in the same root path they have started.

This for sure is your root path that you have started Dgraph. And it will increases and decrease of size once Dgraph runs GC and some other tasks.

Can i delete the folder?I found that there are also vlog and sst files in the file
image

If you wanna cleanup the whole thing, yes. You can delete everything. But export your data first to a safe place.

From dgraph/index.go at master · dgraph-io/dgraph · GitHub, I can see that this directory is a temporary directory that is used when a predicate is being reindexed. It should be automatically cleaned up after the reindexing process is done for a predicate. Seems like it wasn’t removed for you automatically for some reason.

If you don’t have any ongoing reindexing, you can delete the folder safely.

2 Likes

Thank you for your reply, I have re-imported the data