Skip to content

Conversation

patrick-ogrady
Copy link
Contributor

Related: #1175

@patrick-ogrady patrick-ogrady requested a review from Copilot June 30, 2025 21:10
Copilot

This comment was marked as outdated.

while i < next_data.len() {
// Skip equal bytes
while i < next_data.len() && i < target_data.len() && next_data[i] == target_data[i] {
// Fast-forward over identical blocks
Copy link
Contributor Author

@patrick-ogrady patrick-ogrady Jun 30, 2025

Choose a reason for hiding this comment

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

This should dramatically speed up sync performance over sparse diffs.

@patrick-ogrady patrick-ogrady requested a review from danlaine June 30, 2025 21:34
@patrick-ogrady patrick-ogrady marked this pull request as ready for review June 30, 2025 21:34
@patrick-ogrady patrick-ogrady requested a review from Copilot June 30, 2025 21:35
Copy link
Contributor

@Copilot 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

This PR addresses feedback by refactoring the metadata storage system. Key changes include:

  • Replacing the tuple-based blob storage with a dedicated Wrapper struct.
  • Updating the load and sync functions to work with the new Wrapper abstraction.
  • Adjusting documentation comments and test assertion error formatting for consistency.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
storage/src/metadata/storage.rs Refactored blob storage to use a Wrapper struct and updated related load and sync logic.
storage/src/metadata/mod.rs Updated documentation comments to reference [Metadata] and modified test assertions formatting.
Comments suppressed due to low confidence (1)

storage/src/metadata/mod.rs:546

  • The test assertion's format string "{buffer}" will not interpolate the buffer variable as intended. Consider updating it to use "{}", buffer to ensure that the error message displays the actual buffer content.
            assert!(buffer.contains("skipped_total 0"), "{buffer}");

danlaine
danlaine previously approved these changes Jun 30, 2025
Copy link
Collaborator

@danlaine danlaine left a comment

Choose a reason for hiding this comment

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

Just the one remaining nit about using B: Blob

@patrick-ogrady patrick-ogrady merged commit 03b535e into main Jun 30, 2025
28 checks passed
@patrick-ogrady patrick-ogrady deleted the metadata-linting branch June 30, 2025 21:52
Copy link

codecov bot commented Jun 30, 2025

Codecov Report

Attention: Patch coverage is 94.11765% with 4 lines in your changes missing coverage. Please review.

Project coverage is 91.21%. Comparing base (d29e63c) to head (3eede9c).
Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
storage/src/metadata/mod.rs 50.00% 4 Missing ⚠️
@@            Coverage Diff             @@
##             main    #1179      +/-   ##
==========================================
+ Coverage   91.08%   91.21%   +0.13%     
==========================================
  Files         216      216              
  Lines       57795    57964     +169     
==========================================
+ Hits        52640    52874     +234     
+ Misses       5155     5090      -65     
Files with missing lines Coverage Δ
storage/src/metadata/storage.rs 98.19% <100.00%> (-0.12%) ⬇️
storage/src/metadata/mod.rs 98.93% <50.00%> (-1.07%) ⬇️

... and 9 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3da0f82...3eede9c. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

2 participants