Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@danlaine
Copy link
Collaborator

Previously, the lower bound supplied to the sync client was the pruning boundary of the target database.

This change makes it so the client instead receives the inactivity floor to use as the lower sync boundary.

The motivation for this change is that, during state sync, the client will request the operations in the sync target range from the server(s). If the client's sync lower bound is the server's pruning boundary, and the server continues to add operations and prune old operations, then it's likely the server will prune operations that the sync client needs to complete. Using the inactivity floor adds a buffer, making this situation less likely.

danlaine added 30 commits July 11, 2025 15:31
@danlaine danlaine self-assigned this Jul 15, 2025
translator: Translator::default(),
thread_pool: None,
buffer_pool: commonware_runtime::buffer::PoolRef::new(1024, 10),
pruning_gap: 10,
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Seems like an OK value to use during tests? It's sufficiently small such that the "gap" will exist even if we only insert relatively few operations into the database.

@danlaine danlaine marked this pull request as ready for review July 15, 2025 22:35
@danlaine danlaine requested a review from patrick-ogrady July 15, 2025 23:01
@patrick-ogrady patrick-ogrady merged commit cc1d321 into main Jul 16, 2025
27 of 31 checks passed
@patrick-ogrady patrick-ogrady deleted the danlaine/sync-lower-bound branch July 16, 2025 14:53
@codecov
Copy link

codecov bot commented Jul 16, 2025

Codecov Report

Attention: Patch coverage is 99.66443% with 1 line in your changes missing coverage. Please review.

Project coverage is 91.13%. Comparing base (d28e92d) to head (eb84f82).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
storage/src/adb/current.rs 99.27% 1 Missing ⚠️
@@            Coverage Diff             @@
##             main    #1277      +/-   ##
==========================================
+ Coverage   91.09%   91.13%   +0.03%     
==========================================
  Files         246      246              
  Lines       60496    60744     +248     
==========================================
+ Hits        55110    55358     +248     
  Misses       5386     5386              
Files with missing lines Coverage Δ
storage/src/adb/any/mod.rs 99.12% <100.00%> (+0.06%) ⬆️
storage/src/adb/any/sync/client.rs 90.78% <100.00%> (+0.15%) ⬆️
storage/src/adb/current.rs 96.88% <99.27%> (+0.55%) ⬆️

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 d28e92d...eb84f82. 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