Rocksdb logging configuration#5047
Merged
pwojcikdev merged 2 commits intonanocurrency:developfrom Mar 22, 2026
Merged
Conversation
Test Results for Commit 8b1f209Pull Request 5047: Results Test Case Results
Last updated: 2026-03-20 23:00:21 UTC |
Contributor
There was a problem hiding this comment.
Pull request overview
Adds operator-configurable controls for RocksDB logging to reduce excessive on-disk RocksDB log accumulation, by exposing log retention count and log verbosity through the existing TOML-based rocksdb_config.
Changes:
- Add
max_log_filesandlog_levelfields (with new defaults) tonano::rocksdb_configand TOML (de)serialization + validation. - Apply these settings to RocksDB
Options(keep_log_file_num,info_log_level) when opening the DB. - Extend daemon TOML deserialization test to include the new RocksDB config keys.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| nano/store/rocksdb/backend_rocksdb.cpp | Applies RocksDB log retention and log level to RocksDB Options. |
| nano/lib/rocksdbconfig.hpp | Introduces new RocksDB logging config fields with defaults. |
| nano/lib/rocksdbconfig.cpp | Serializes/deserializes new fields and validates their values. |
| nano/core_test/toml.cpp | Updates daemon TOML test input and assertions to include new keys. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

A node operator has reported several gigabytes of RocksDb log files.
The default number of archived logfiles is 1000. This means that log files are deleted after 1000 days (one log file per day)
The current default log level for RocksDb is "info" which is quite verbose.
This PR lets the node operator set the log level and the maximum number of archived logs.
New default values are:
max_log_files 100
log_level "warn"