IGNITE-27924 Expose size of log storage manager data on disk#7638
Open
rpuch wants to merge 1 commit intoapache:mainfrom
Open
IGNITE-27924 Expose size of log storage manager data on disk#7638rpuch wants to merge 1 commit intoapache:mainfrom
rpuch wants to merge 1 commit intoapache:mainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This pull request adds functionality to expose the size of log storage manager data on disk, addressing JIRA issue IGNITE-27924. The implementation adds a new totalBytesOnDisk() method to the LogStorageManager interface and provides implementations across all concrete log storage manager classes.
Changes:
- Added
totalBytesOnDisk()method toLogStorageManagerinterface - Implemented disk size tracking using RocksDB's
SstFileManagerand WAL file enumeration for RocksDB-based managers - Implemented file system walking for Logit-based storage manager
- Added comprehensive test coverage for RocksDB-based implementations
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| modules/raft/src/main/java/org/apache/ignite/internal/raft/storage/LogStorageManager.java | Added new interface method totalBytesOnDisk() |
| modules/raft/src/main/java/org/apache/ignite/internal/raft/storage/impl/RocksDbSizeCalculator.java | New utility class to calculate RocksDB storage size (SST files + WAL files) |
| modules/raft/src/main/java/org/apache/ignite/internal/raft/storage/impl/DefaultLogStorageManager.java | Implemented disk size tracking with RocksDB's SstFileManager, added env and sstFileManager fields |
| modules/raft/src/main/java/org/apache/ignite/internal/raft/storage/impl/VolatileLogStorageManagerCreator.java | Added disk size tracking infrastructure and exposed totalBytesOnDisk() at creator level |
| modules/raft/src/main/java/org/apache/ignite/internal/raft/storage/impl/VolatileLogStorageManager.java | Returns 0 as this is volatile storage with the actual tracking at creator level |
| modules/raft/src/main/java/org/apache/ignite/internal/raft/storage/impl/LocalLogStorageManager.java | Returns 0 as this uses on-heap storage with no disk footprint |
| modules/raft/src/main/java/org/apache/ignite/internal/raft/storage/logit/LogitLogStorageManager.java | Implemented using Files.walk() to traverse directory tree and sum file sizes |
| modules/raft/src/test/java/org/apache/ignite/internal/raft/storage/impl/DefaultLogStorageManagerTest.java | Added tests for WAL and SST file size tracking, introduced @DisableFsync annotation |
| modules/raft/src/test/java/org/apache/ignite/internal/raft/storage/impl/VolatileLogStorageManagerCreatorTest.java | New test file covering disk size reporting for volatile storage with spillout |
| modules/raft/src/integrationTest/java/org/apache/ignite/internal/raft/ItTruncateSuffixAndRestartTest.java | Updated test implementation to include totalBytesOnDisk() stub |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
...raft/src/main/java/org/apache/ignite/internal/raft/storage/logit/LogitLogStorageManager.java
Show resolved
Hide resolved
...main/java/org/apache/ignite/internal/raft/storage/impl/VolatileLogStorageManagerCreator.java
Show resolved
Hide resolved
...main/java/org/apache/ignite/internal/raft/storage/impl/VolatileLogStorageManagerCreator.java
Outdated
Show resolved
Hide resolved
...raft/src/main/java/org/apache/ignite/internal/raft/storage/logit/LogitLogStorageManager.java
Show resolved
Hide resolved
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.
https://issues.apache.org/jira/browse/IGNITE-27924