Provided seed files are updated (the more the job is repited, the more they are modified)

Open
#558 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
42/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
java
Domain
backend

Research direction

Start by examining TextSeedModule and its textSource ConfigFile handling, then reproduce repeated crawls using a seed file with redirects. Done means the configured seed file remains unchanged across crawls, while seed processing still behaves correctly and initialization does not repeatedly consume accumulated annotations.

Written by the indexing model from the issue text.

Description

pull request welcome

Hi!

I'm running several crawls with the same seed file, but I noticed that Heritrix add lines to this file and explicitly modify it. Couldn't this be avoided like, I don't know, maybe copying the seed file to the job directory and modify that copy?

Seed-related configuration:

 <bean id="seeds" class="org.archive.modules.seeds.TextSeedModule">
  <property name="textSource">
   <bean class="org.archive.spring.ConfigFile">
    <property name="path" value="/path/to/seeds" />
   </bean>
  </property>
  <property name='sourceTagSeeds' value='false'/>
  <property name='blockAwaitingSeedLines' value='-1'/>
 </bean>

The problem is that I started with a file of 51451 lines and currently has 1083095 after maybe 20 times it's been reused. This slows down the initialization, but even worse, the initialization is different after each crawl because some of the seeds I have redirects to other website or the same website but a specific resource (not only the common redirection from http to https which I guess it's the reason why this feature was implemented), but that redirection which is annotated in this seed file, in the next crawl job redirects again to another redirection. So, in the end, my seed files is adding new seeds which I hadn't noticed before.

Thank you!

Dominant language
Java
Stars
3.4k
Forks
800
Avg merge
1d 5h
Merged PRs (30d)
30

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from internetarchive/heritrix3

All issues in internetarchive/heritrix3

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.