PAR2 Repair Suggestion

Feel free to talk about anything and everything in this board.
Post Reply
devz3ro
Newbie
Newbie
Posts: 4
Joined: December 15th, 2008, 4:33 am

PAR2 Repair Suggestion

Post by devz3ro »

First off - Great job on this program.

I've noticed that when a release is damaged it runs verify twice (or at least I think it does).

I assume par2verify, then par2repair.

Would running just par2repair on everything cut out the need for par2verify? It should just output "repair not needed" on releases that aren't damaged.

Please advice whether this is a feasible solution to cut down on post-processing.
User avatar
switch
Moderator
Moderator
Posts: 1380
Joined: January 17th, 2008, 3:55 pm
Location: UK

Re: PAR2 Repair Suggestion

Post by switch »

We do actually just run the repair process. However the par2 program insists on doing a verify first (it does need to know which blocks are broken after all). So we are stuck with always doing a verify before a repair, however it is only one verify not two.

0.5 will help as it has a sort of on-the-fly verification which will negate the need to run par2 at all if all files are fine.
devz3ro
Newbie
Newbie
Posts: 4
Joined: December 15th, 2008, 4:33 am

Re: PAR2 Repair Suggestion

Post by devz3ro »

Great news on 0.5!

As far as the current release goes...

I have a nzb file that I just loaded that does verify twice for some reason. I can send it via PM if needed. This has happened on multiple occasions. My news server with incomplete articles might be to blame =(.

While monitoring the history tab:

It first does a verify
finds out that extra pars are needed and grabs them
runs verify again
repairs

Is this normal?
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: PAR2 Repair Suggestion

Post by shypike »

devz3ro wrote: It first does a verify
finds out that extra pars are needed and grabs them
runs verify again
repairs
Is this normal?
Yes it's normal. The purpose is to minimize the amount of downloaded par2 files.
So first it download only the smallest par2 file and the normal files.
Then a verification is done, this tells how many more par2 files are needed.
These are downloaded.
Then the repair is run.
Sometimes even more par2 files are needed (because they were also damaged or missing).
In that case downloading and repairing is repeated.

This is optimized to minimize the amount of downloaded data, which is what
most people want (at least in the recent past).

It may be not optimal for people with high bandwidth, high caps and unlimited news servers.
devz3ro
Newbie
Newbie
Posts: 4
Joined: December 15th, 2008, 4:33 am

Re: PAR2 Repair Suggestion

Post by devz3ro »

Thanks for the explanation, that does actually make a lot of sense to do it that way. Especially if you have a download limit.

I do happen to have a fibre connection at my house with an unlimited news account, so I am exempt from any bandwidth cap(s).

Would it be possible to add an option in the next-coming release to download a minimum amount of pars for verification? (5mb, 10mb etc.)

It seems like the ones that need repairing only need ~5mb worth of pars to repair.

That is if 0.5 is that far away.

Thanks again for your help & support.
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: PAR2 Repair Suggestion

Post by shypike »

Worthwhile suggestion.

I would change it a bit:
If QuickCheck (= on-the-fly check) sees there are problems, just download some extra par2 files
before attempting repair.
This is because most of the time the smallest par2 isn't big enough.

The easiest option to implement would be:
If QuickCheck sees a problem, just download all par2 files.
Post Reply