FetchItemQueues removes empty queues, which skips the politeness delay
Los mantenedores suelen responder en 1 día
Evaluación
Este issue todavía no se ha evaluado.
Descripción
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.
- Lenguaje dominante
- Java
- Estrellas
- 1k
- Forks
- 297
- Merge medio
- 1 d 11 h
- PR fusionados (30 d)
- 61
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de apache/stormcrawler
-
Archetypes' http.content.limit cuts sitemaps, which then fail to parsePosiblemente ocupada @dpol1 la tomó hace 1 día. Abiertobug
apache/stormcrawler#2305 · 3 comentarios · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 3/5 1-2 días Aptitud para principiantes 55/100
apache/stormcrawler#2304 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
[Improvement] Work towards Maven 4 CompatibilityPosiblemente ocupada @mvolikas la tomó hace 365 días. Abiertogood first issue help wanted
apache/stormcrawler#1662 · 2 comentarios · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
Delete redirected pagesQuizá libre de nuevo @tomatotomata la tomó hace 98 días y no hay ningún pull request abierto. Abiertocore good first issue
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
apache/stormcrawler#994 · 5 comentarios ·
Los mantenedores suelen responder en 1 día
-
Normalise HTTP headersQuizá libre de nuevo Un pull request para esta issue se cerró sin fusionarse. Abiertocore fetcher good first issue help wanted
Dificultad 3/5 1-2 días Aptitud para principiantes 38/100
apache/stormcrawler#108 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
Todos los issues de apache/stormcrawler
Issues similares
-
Document and enforce pull request review guidelinesPosiblemente ocupada @dashorst la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día
-
`Time.at(t, in: nil)` returns UTC instead of the local time (or the time zone of `t`), unlike CRubyAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
hermes-queue
Dificultad 1/5 Menos de una hora Aptitud para principiantes 72/100
chrisalunlloyd2-sudo/mindpalace#349 ·
Los mantenedores suelen responder en 1 día
-
Retry-After parser accepts invalid delay-seconds valuesPosiblemente ocupada @Dhruvraj-Rana la tomó hoy. AbiertoBug
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
open-telemetry/opentelemetry-java#9018 ·
Los mantenedores suelen responder en 2 días
-
dropwizard-testing: DAOTest.inTransaction leaves the transaction open when an Error is thrownAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
dropwizard/dropwizard#11410 ·
Los mantenedores suelen responder en 1 día