mirror of
https://relay.ngit.dev/npub15qydau2hjma6ngxkl2cyar74wzyjshvl65za5k5rl69264ar2exs5cyejr/ngit-grasp.git
synced 2026-10-05 23:18:24 +00:00
Use Git's noop negotiation algorithm only for identifier-family integrity fetches. A corrupt family can retain refs whose objects are absent; normal negotiation treats those refs as local have tips, requests an empty pack, and then fails connectivity even when the remote advertises the missing commit.\n\nThe dedicated integrity fetch role forces the accepted clone source to send the requested object's complete closure into the shared family object directory. Primary and hedged proactive fetches deliberately retain normal negotiation so routine transfers stay incremental.\n\nValidated against a quarantined production canary object, with strict all-target Clippy, all git::integrity unit tests, and a regression test for integrity-only noop selection.
26 lines
906 B
Rust
26 lines
906 B
Rust
//! Purgatory sync module for background git data synchronization.
|
|
//!
|
|
//! This module implements identifier-based syncing with:
|
|
//! - Batched OID fetching across all purgatory events for an identifier
|
|
//! - Domain-based throttling (configurable requests/minute per domain)
|
|
//! - Exponential backoff per identifier (20s → 2m, then 2m intervals)
|
|
//! - Debouncing for burst event arrivals
|
|
//! - Background sync loop processing ready identifiers every 1 second
|
|
|
|
mod context;
|
|
mod functions;
|
|
mod r#loop;
|
|
mod queue;
|
|
mod throttle;
|
|
|
|
pub use context::{GitFetchRole, ProcessResult, RealSyncContext, SyncContext};
|
|
pub use functions::{
|
|
get_throttled_domains_with_untried_urls, sync_identifier, sync_identifier_from_url,
|
|
sync_identifier_next_url, ThrottledDomainInfo,
|
|
};
|
|
pub use queue::SyncQueueEntry;
|
|
pub use throttle::{DomainThrottle, ThrottleManager};
|
|
|
|
#[cfg(test)]
|
|
pub use context::mock::MockSyncContext;
|