Recently, we found that the log files of rocksdb, Nebula's backend storage engine, sometimes take up a lot of disk space, especially when there is a lot of graph space. Because each graph space will have a set of rocksdb log files, the default log level of rocksdb is DEBUG (0), and will save 1000 old log files (the default value of keep_log_file_num is 1000), the most terrible thing is these old logs The size of the file is more than 20 KB, but the actual disk space occupied is 128KB, resulting in a multiple increase in disk usage.
Looking at the source code of rocksdb, you can set the info_log_level option in its options file to increase the log level. But I pass "–rocksdb_db_options={"info_log_level":"2"}" in the nebula-storaged.conf file, and an error will be reported at line 114 of Nebula's RocksEngine.cpp: Check failed: status.ok() Invalid argument: No mapping for enum : info_log_level, Nebula version is V3.0.0.
Would you like to ask the heroes in the community to help us understand the reason? How can I set the log level of Rocksdb?