mirror of
https://github.com/beshu-tech/deltaglider.git
synced 2026-01-11 22:50:24 +01:00
fix: Exclude reference.bin from bucket stats calculations
reference.bin files are internal implementation details used for delta compression. Their size was being incorrectly counted in both total_size and compressed_size, resulting in 0% savings contribution. Since delta file metadata already contains the original file_size that the delta represents, including reference.bin would double-count storage. This fix skips reference.bin files during stats calculation, consistent with how they're filtered in other parts of the codebase (aws_compat.py, sync.py, client.py). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -141,6 +141,11 @@ def get_bucket_stats(
|
||||
direct_count = 0
|
||||
|
||||
for obj in all_objects:
|
||||
# Skip reference.bin files - they are internal implementation details
|
||||
# and their size is already accounted for in delta metadata
|
||||
if obj.key.endswith("/reference.bin") or obj.key == "reference.bin":
|
||||
continue
|
||||
|
||||
compressed_size += obj.size
|
||||
|
||||
if obj.is_delta:
|
||||
|
||||
Reference in New Issue
Block a user