FetchItemQueues removes empty queues, which skips the politeness delay
Maintainer thường phản hồi trong vòng 1 ngày
Đánh giá
Issue này chưa được đánh giá.
Mô tả
FetchItemQueues.finishFetchItem removes a queue as soon as its last URL is done. The next URL for that host gets a new queue, which is ready straight away. If that URL arrives after the queue has emptied, for instance an outlink of the host's last page, it can be fetched at once, ignoring fetcher.server.delay and the Crawl-delay from the robots.txt.
This test fails in FetchItemQueuesTest, as a.net/2 is handed out at once:
FetchItemQueues q = queues("fetcher.server.delay", 5.0f);
add(q, "http://a.net/1");
q.finishFetchItem(q.getFetchItem(), false); // the queue of a.net is removed
add(q, "http://a.net/2");
Assertions.assertNull(q.getFetchItem());
In a local crawl with fetcher.server.delay: 3, I got two requests to the same host 11 ms apart. In 12-minute crawls of GQ32K hosts with the default delay of 1 s, a fetch started less than 1 s after the previous one to the same host had ended in 107 of 18,315 cases with OpenSearch, and in 5,422 of 14,151 with URLFrontier, across 799 hosts. The usual gap is just over 1 s. The higher figure is probably because URLFrontier hands out a host's next URLs sooner than the OpenSearch spout, so they more often arrive while the delay is still running. These figures come from the worker logs. I haven't traced them to this code path, and a shorter Crawl-delay could explain some of them.
3.7.0 has the same gap, though not in every case. Its empty queues stay until a getFetchItem scan reaches them, and the threads scan after each fetch and every 100 ms when idle, so a URL arriving before the scan still waits. Since #2132 finishFetchItem removes the queue itself, so the new queue is immediately eligible. I ran the 3.7.0 case only on its queue code.
NUTCH-2947 fixed the same problem in Nutch 1.19 by keeping the state of empty queues. I suggest keeping the time of a host's last fetch until its delay has passed. I can open a PR with the test and a fix, for 4.0 or later.
cc @GGraziadei, since #2132 expected the per-host rate to stay bounded by the crawl delay.
- Ngôn ngữ chính
- Java
- Star
- 1k
- Fork
- 297
- Merge trung bình
- 1 ngày 11 giờ
- Pull request đã merge (30 ngày)
- 61
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của apache/stormcrawler
-
Archetypes' http.content.limit cuts sitemaps, which then fail to parseCó thể đã có người làm @dpol1 đã nhận 1 ngày trước. Đang mởbug
apache/stormcrawler#2305 · 3 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
apache/stormcrawler#2304 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Improvement] Work towards Maven 4 CompatibilityCó thể đã có người làm @mvolikas đã nhận 365 ngày trước. Đang mởgood first issue help wanted
apache/stormcrawler#1662 · 2 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Delete redirected pagesCó thể làm lại được @tomatotomata đã nhận 98 ngày trước và không có pull request nào đang mở. Đang mởcore good first issue
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
apache/stormcrawler#994 · 5 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Normalise HTTP headersCó thể làm lại được Pull request cho issue này đã bị đóng mà không được merge. Đang mởcore fetcher good first issue help wanted
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 38/100
apache/stormcrawler#108 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của apache/stormcrawler
Issue tương tự
-
Document and enforce pull request review guidelinesCó thể đã có người làm @dashorst đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
`Time.at(t, in: nil)` returns UTC instead of the local time (or the time zone of `t`), unlike CRubyĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
hermes-queue
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 72/100
chrisalunlloyd2-sudo/mindpalace#349 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Retry-After parser accepts invalid delay-seconds valuesCó thể đã có người làm @Dhruvraj-Rana đã nhận hôm nay. Đang mởBug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
open-telemetry/opentelemetry-java#9018 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
dropwizard-testing: DAOTest.inTransaction leaves the transaction open when an Error is thrownĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
dropwizard/dropwizard#11410 ·
Maintainer thường phản hồi trong vòng 1 ngày