2 months ago
32bb84dAdd a unified network retry policy (net_policy.rs) with exponential backoff, full jitter, Retry-After header honoring, cancellation, and persisted attempt progress. The policy classifies temporary failures (connection/timeout, HTTP 408/425/429/5xx) as retryable and permanent failures (400/403/404/409/412) as immediate-abort, sharing classification helpers with the streaming range fetcher. Implement resumable uploads for each provider: - Dropbox: upload_session start/append_v2/finish with persisted session_id and offset. - Google Drive: resumable upload via uploadType=resumable with session URL, chunked PUT, and 308 status offset query. - WebDAV: staged PUT to .openkara/staging/<op-id>/ + server-side MOVE to the final path (resumable_upload stays false; server_side_move = true). Implement resumable downloads in atomic_download.rs: resume from a verified offset via Range requests, persist progress to remote_transfer_parts, and invalidate the partial on provider_revision mismatch. The executor's candidate DB upload uses the resumable path for files >= 8 MiB. Fix defect #10 in ProviderFetcher credential refresh: replace the refresh_attempted AtomicBool (which allowed only one refresh per fetcher lifetime and never reset) with a credential_generation AtomicU64 and a single-flight refresh guard. Concurrent expired requests trigger one refresh; waiting requests observe the new generation and retry. 401 triggers refresh; 403 (permission denial) is permanent and not retried. A successful request advances the generation so a future expiry can refresh again. Replace the PR#5 placeholder recovery test with real tests for incomplete transfer-part detection and revision-mismatch invalidation. Refs #151
Parent71d9479