Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.7.2, 1.8.2, 1.9.1
Description
With Flink's default settings for RocksDB, it will write a log file (not the WAL, but pure logging statements) into the data folder. Besides periodic statistics, it will log compaction attempts, new memtable creations, flushes, etc.
A few things to note about this practice:
- this LOG file is growing over time with no limit
- the default logging level is INFO
- the statistics in there may help looking into performance and/or disk space problems (but maybe you should be looking and monitoring metrics instead)
- this file is not useful for debugging errors since it will be deleted along with the local dir when the TM goes down
With a custom OptionsFactory, the user can change the behaviour like the following:
@Override public DBOptions createDBOptions(DBOptions currentOptions) { currentOptions = super.createDBOptions(currentOptions); currentOptions.setKeepLogFileNum(10); currentOptions.setInfoLogLevel(InfoLogLevel.WARN_LEVEL); currentOptions.setStatsDumpPeriodSec(0); currentOptions.setMaxLogFileSize(1024 * 1024); // 1 MB each return currentOptions; }
However, the rotating logger does currently not work (it will not delete old log files - see https://github.com/dataArtisans/frocksdb/pull/12). Also, the user should not have to write his own OptionsFactory to get a sensible default.
To prevent this file from filling up the disk, I propose to change Flink's default RocksDB settings so that the LOG file is effectively disabled (nothing is written to it by default).
Attachments
Issue Links
- is related to
-
FLINK-23791 Enable RocksDB log again
- Resolved
-
FLINK-14482 Bump up rocksdb version
- Closed
-
FLINK-23812 Support configuration of the RocksDB info logging via configuration
- Closed
-
FLINK-15747 Enable setting RocksDB log level from configuration
- Closed
- links to