Skip to content

Conversation

@gaius-qi
Copy link
Member

Description

This pull request introduces improvements to logging and optimizes the RocksDB storage engine configuration. The most significant changes are the addition of debug logs after write operations and adjustments to RocksDB compression and sync settings to improve performance and observability.

Logging Improvements:

  • Added debug logs after successful piece writes in both content_linux.rs and content_macos.rs to indicate completion of write operations. [1] [2]
  • Added a debug log in server/tcp.rs after flushing the TCP writer to signal stream completion.

RocksDB Storage Engine Optimization:

  • Introduced a new constant DEFAULT_BYTES_PER_SYNC and set RocksDB sync options (set_use_fsync(false) and set_bytes_per_sync) to optimize disk writes. [1] [2]
  • Changed the bottommost compression type from Zstd to Lz4 for consistency with the main compression type.
  • Updated the write operation to use WriteOptions with sync explicitly set to false, potentially improving write performance.

Related Issue

Motivation and Context

Screenshots (if appropriate)

Signed-off-by: Gaius <gaius.qi@gmail.com>
@gaius-qi gaius-qi added this to the v2.4.0 milestone Nov 24, 2025
@gaius-qi gaius-qi self-assigned this Nov 24, 2025
@gaius-qi gaius-qi added the enhancement New feature or request label Nov 24, 2025
@codecov
Copy link

codecov bot commented Nov 24, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 47.59%. Comparing base (69f5167) to head (14c219e).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1492      +/-   ##
==========================================
+ Coverage   47.57%   47.59%   +0.02%     
==========================================
  Files          70       70              
  Lines       17724    17731       +7     
==========================================
+ Hits         8432     8439       +7     
  Misses       9292     9292              
Files with missing lines Coverage Δ
dragonfly-client-storage/src/content_linux.rs 77.59% <ø> (ø)
dragonfly-client-storage/src/server/tcp.rs 0.00% <ø> (ø)
...onfly-client-storage/src/storage_engine/rocksdb.rs 97.42% <100.00%> (+0.03%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@gaius-qi gaius-qi enabled auto-merge (squash) November 25, 2025 02:32
Copy link
Member

@BruceAko BruceAko left a comment

Choose a reason for hiding this comment

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

LGTM

@gaius-qi gaius-qi merged commit 543d04d into main Nov 25, 2025
9 checks passed
@gaius-qi gaius-qi deleted the feature/rocksdb branch November 25, 2025 02:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants