fix(spiders): persist seen fingerprints in checkpoints#70
Conversation
Checkpoints saved on pause wrote an empty seen_fingerprints list, so a resumed crawl re-visited every URL crawled before the pause: restored pending requests would re-discover links whose fingerprints were lost with the in-memory dedup set. Scheduler gains snapshot() (pending URLs + seen set copy) and restore_seen(); the engine now persists the seen set on pause and restores it before re-enqueuing pending URLs on resume. Mirrors upstream Scrapling d1082bd/95687a5 where the scheduler owns checkpoint state including the seen set. In-flight requests remain covered by the existing drain-before-checkpoint on pause. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KDFsMaKk764vogjUW3nqpk
|
Warning Review limit reached
Next review available in: 13 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (5)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
- Pass the restored fingerprint Vec by value instead of cloning every entry, and correct the restore comment: pending requests originally enqueued with dont_filter never entered the seen set, and they must be re-crawled regardless. - Write checkpoints compactly: with the seen set persisted the file grows with the crawl, and pretty-printing roughly doubles it. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KDFsMaKk764vogjUW3nqpk
Summary
Upstream sync (2/4). Checkpoints saved on pause wrote
seen_fingerprints: Vec::new(), so a resumed crawl lost the dedup set and re-visited every URL crawled before the pause.Scheduler::snapshot()returns pending URLs plus a copy of the seen fingerprint set;Scheduler::restore_seen()restores it.dont_filtersince their fingerprints are part of the restored set).d1082bd/95687a5, where the scheduler owns checkpoint state including the seen set. In-flight requests remain covered by the existing drain-before-checkpoint on pause (fix: drain tasks before checkpoint and enforce per-domain limit (#9 #10) #22).Tests
dont_filter.Full suite green locally: 222 passed (
cargo test,cargo clippy --all-targets -- -D warnings,cargo fmt --check).🤖 Generated with Claude Code
https://claude.ai/code/session_01KDFsMaKk764vogjUW3nqpk
Generated by Claude Code