Skip to content

fix: avoid crawling handled requests again after migration in large request queues - #1189

Open
vdusek wants to merge 3 commits into
masterfrom
fix/rq-single-already-handled
Open

vdusek wants to merge 3 commits into
masterfrom
fix/rq-single-already-handled

Conversation

@vdusek

@vdusek vdusek commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

In single-access mode, a request that the batch add reports as already handled is recorded as handled locally and kept out of the cache and the head, so fetch_next_request doesn't hand it out again. Before, this hit runs with more than 10,000 requests after a migration, reboot or resurrection: re-added start URLs and re-discovered links were crawled twice.

The shared client also takes the platform's handled flag into its dedup cache, for consistency.

Closes: #1185

✍️ Drafted by Claude Code

@vdusek vdusek added the t-tooling Issues with this label are in the ownership of the tooling team. label Oct 16, 2026
@vdusek vdusek self-assigned this Oct 16, 2026
@codecov

codecov Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.07%. Comparing base (290af90) to head (7585abd).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1189      +/-   ##
==========================================
+ Coverage   93.00%   93.07%   +0.06%     
==========================================
  Files          54       54              
  Lines        3672     3680       +8     
==========================================
+ Hits         3415     3425      +10     
+ Misses        257      255       -2     
Flag Coverage Δ
e2e 31.65% <0.00%> (-0.07%) ⬇️
integration 51.73% <77.77%> (+0.05%) ⬆️
unit 89.83% <100.00%> (+0.10%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@vdusek vdusek changed the title fix: skip requests the batch add reports as already handled in single RQ client fix: avoid crawling handled requests again after migration in large request queues Oct 16, 2026
@vdusek
vdusek marked this pull request as ready for review October 16, 2026 10:54
@vdusek
vdusek requested review from Mantisus and Pijukatel October 16, 2026 10:54
@apify-service-account apify-service-account added the tested Temporary label used only programatically for some analytics. label Oct 16, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

t-tooling Issues with this label are in the ownership of the tooling team. tested Temporary label used only programatically for some analytics.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Single RQ re-processes requests the batch add reports as already handled

2 participants