aMule Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're back! (IN POG FORM)

Author Topic: .mets more crash robust and clear finished button  (Read 6400 times)

DexterF

  • Jr. Member
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 54
.mets more crash robust and clear finished button
« on: May 09, 2004, 01:54:35 PM »

with 2.0.0rc3 i still lost .mets during a power outage, luckily the baks were pretty frsh but still this could use some improvement.

and something simple: a "clear finished downloads" button in top button row instead of as a context menu option. (I operate the aMule machine via VNC, this would be a bliss :) )
Logged

Jacobo221

  • Hero Member
  • *****
  • Karma: 3
  • Offline Offline
  • Posts: 2712
Re: .mets more crash robust and clear finished button
« Reply #1 on: May 10, 2004, 12:51:12 AM »

Well, that's what .baks are for ;-D
I don't have problems on loosing mets on sudden power off. What filesystem are you on?

Greetings
Logged

DexterF

  • Jr. Member
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 54
Re: .mets more crash robust and clear finished button
« Reply #2 on: May 10, 2004, 01:38:42 AM »

well, i have to copy them back manually and never know how fresh they are. below standard imho.
XFS here.
Logged

Kry

  • Ex-developer
  • Retired admin
  • Hero Member
  • *****
  • Karma: -665
  • Offline Offline
  • Posts: 5795
Re: .mets more crash robust and clear finished button
« Reply #3 on: May 10, 2004, 01:16:03 PM »

The bak files are there to save you for that. there is no way we can make the mets more robust, because it's a kernel/filesystem problem if they don't flush the file.


BTW: you shouldn't care about .bak's file age - it rehashes the .part and gets back to the state of the .met deleted. So you lose not a single byte.


On a side note, .bak files are created every 10 seconds or something alike.
Logged

DexterF

  • Jr. Member
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 54
Re: .mets more crash robust and clear finished button
« Reply #4 on: May 11, 2004, 12:19:09 AM »

10secs - ok, that's something I didn't know.
But: what if the machine goes down during bak write? maybe should have a ring system.

If aMule can rehash from .part, why do I need a .met file to rehash? why isn't it possible to recreate mets from scratch?
Logged

Kry

  • Ex-developer
  • Retired admin
  • Hero Member
  • *****
  • Karma: -665
  • Offline Offline
  • Posts: 5795
Re: .mets more crash robust and clear finished button
« Reply #5 on: May 11, 2004, 01:08:28 AM »

no. reahshes the part acorfin the the .met.bak info. the .met is metadata (file name, size, hash, etc) and NEED to be there.
Logged

DexterF

  • Jr. Member
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 54
Re: .mets more crash robust and clear finished button
« Reply #6 on: May 11, 2004, 12:52:10 PM »

Storing the hash in one seperate file that doesn't get touched again and hence wouldn't be prone to fs corruption during power outage and the like would help here. So even if the met is lost, aMule could look up file name, size and the like on itself as long as the file is available.
Logged

Jacobo221

  • Hero Member
  • *****
  • Karma: 3
  • Offline Offline
  • Posts: 2712
Re: .mets more crash robust and clear finished button
« Reply #7 on: May 11, 2004, 01:36:33 PM »

You should take a look at the aMule FAQ to read about hashing files and what files are meant to do. aMule FAQ: http://www.amule.org/wiki/index.php/FAQ_aMule
Greetings!
Logged

DexterF

  • Jr. Member
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 54
Re: .mets more crash robust and clear finished button
« Reply #8 on: May 11, 2004, 02:34:23 PM »

Yes... did that.. where does it rule out the idea? ?(
Logged

Jacobo221

  • Hero Member
  • *****
  • Karma: 3
  • Offline Offline
  • Posts: 2712
Re: .mets more crash robust and clear finished button
« Reply #9 on: May 11, 2004, 11:36:33 PM »

> Storing the hash in one seperate file that doesn't get touched again
Indeed, if .met weren't needed to be rewritten, then you can be sure they wouldn't be rewritten ;-) What's the goal in spending proccessing time in unuseful instructions?
Greetings.
Logged