Hey @Genki-S,
Is this (i.e. not calling value log GC for Raft WALs) intentional? If so, why?
I don’t think it’s intentional. I guess since the zw directory contains only information about transactions, the amount of data actually written to badger is very less and so we’ve never seen people complain. For instance, you have a zw directory which has a single vlog file that was created 4 months ago. I see here that the max value log file size is 64 mb and you have only of them them. That’s a very less amount of data.
Also, for badger GC to work it needs at least 2 value log (vlog) file. Since you have only one file, even if there was GC running, it wouldn’t have freed up any disk space.
I’ve created Zero instance doesn't run ValueLog GC · Issue #4642 · dgraph-io/dgraph · GitHub to keep track of this. Thanks for figuring this out @Genki-S ![]()
Is manually removing the vlog files an OK-thing to do? What is the worst-case consequence of manually removing the vlog files?
You should not remove the vlog files manually. The vlog file serves as a WAL and you would always have some amount of data (64 mb to ~700 mb) in memory. If you remove the vlog files and Dgraph (badger) crashes, there is no way to recover the in memory data.
If there’s already an established/recommended way of cleaning up the contents of “zw” directory, please let me know. Thanks in advance!
RunValueLogGC would take care of clearing up the vlog files. You shouldn’t worry about clearing up the data.