Skip to content

Rocksdb logging configuration#5047

Merged
pwojcikdev merged 2 commits intonanocurrency:developfrom
RickiNano:rocksdb-logging
Mar 22, 2026
Merged

Rocksdb logging configuration#5047
pwojcikdev merged 2 commits intonanocurrency:developfrom
RickiNano:rocksdb-logging

Conversation

@RickiNano
Copy link
Copy Markdown
Contributor

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"

@gr0vity-dev-bot
Copy link
Copy Markdown

gr0vity-dev-bot commented Mar 20, 2026

Test Results for Commit 8b1f209

Pull Request 5047: Results
Overall Status:

Test Case Results

  • 5n4pr_conf_10k_bintree: PASS (Duration: 120s)
  • 5n4pr_conf_10k_change: PASS (Duration: 205s)
  • 5n4pr_conf_change_dependant: PASS (Duration: 137s)
  • 5n4pr_conf_change_independant: PASS (Duration: 138s)
  • 5n4pr_conf_send_dependant: PASS (Duration: 130s)
  • 5n4pr_conf_send_independant: PASS (Duration: 127s)
  • 5n4pr_rocks_10k_bintree: PASS (Duration: 127s)
  • 5n4pr_rocks_10k_change: FAIL (Duration: 274s)
  • Log

Last updated: 2026-03-20 23:00:21 UTC

@My1
Copy link
Copy Markdown

My1 commented Mar 20, 2026

yeah especially some of the files are also quite large

image

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_files and log_level fields (with new defaults) to nano::rocksdb_config and 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.

@pwojcikdev pwojcikdev merged commit d212a69 into nanocurrency:develop Mar 22, 2026
32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants