← Back to team overview

linuxdcpp-team team mailing list archive

[Bug 919424] Re: /rebuild does not update HashData

 

Rebuild won't delete any trees that are used at some point during the
session. That's seems to be an intentional design choice that simplifies
the code.

While I'm not sure if the behavior described in this post is causing any
*real* problems that would justify complicating the code, there's a
bigger problem related to this design. When an user moves a file from
one shared directory to another one, the tree still stays shared. Since
the client stores each hashed file path separately, the client will
never delete the old paths from the database as long as the tree stays
shared in another location. DC++ keeps all file paths in memory, so this
will slowly keep on increasing the memory usage and the start-up speed.

I've changed the hash database format in AirDC++ 2.50, which allows
comparing each path in hash database with the share. When I gave the new
version to an user who had been experiencing various performance issues,
it revealed that he had more than 16 million unused file entries in the
database.  This had increased his memory usage by several gigabytes (it
used to be 5-8 gigabytes with the old version) and the size of his
HashIndex.xml was more than 4 gigabytes. Of course this also means that
he had moved his files quite a lot because he was "only" sharing 5
million files, but he had probably been using the same database since
the time when hashing support was implemented.

-- 
You received this bug notification because you are a member of
Dcplusplus-team, which is subscribed to DC++.
https://bugs.launchpad.net/bugs/919424

Title:
  /rebuild does not update HashData

Status in DC++:
  Confirmed

Bug description:
  BCDC 0.790a. 
  Windows 7 SP1 x64.

  Summary:
  If you add a new share, hash the files, and then remove it, issue a /rebuild and then re-add the same share again, DC++ will not rehash the files. Furthermore, a /rebuild between adding/removing shares does not change the size of hashdata.dat or hasindex.xml.

  Repro:
  * add a new share. accept the default name. DC++ hashes the files.
  * open your filelist to validate share is present.
  * check the size of hashdata and hashindex.
  * remove the share you just added.
  * issue a /refresh and /rebuild.
  * note the size of hashdata and hashindex has NOT changed.
  * add the same share again, accepting the default name.  DC++ does NOT hash the files.
  * issue a /refresh. DC++ does not re-index the files from that share.

To manage notifications about this bug go to:
https://bugs.launchpad.net/dcplusplus/+bug/919424/+subscriptions


References