markfasheh / duperemove

Tools for deduping file systems
GNU General Public License v2.0
795 stars 80 forks source link

hashstats seems to be broken on 0.12.dev #207

Closed fezie closed 1 year ago

fezie commented 5 years ago

I just made a dedup run with the current git master (13c29f867e) with a freshly created hashfile. Trying to run hashstats on it results in this error:

error 1 while prepping hash search stmt: SQL logic error

fezie commented 5 years ago

Ah just found out now that the problem is, that the hashes table is now named extents with v3 hashfiles. Replacing this in the 3 queries it works fine again

khimaros commented 3 years ago

in my case, hashstats v0.11.2 doesn't even print the top n hashes:

# hashstats -n 10 duperemove.hashes
Raw header info for "duperemove.hashes":
  version: 3.0  block_size: 131072
  num_files: 2  num_hashes: 76197
Print top 10 hashes (this may take some time)
#

same outcome with hashstats -a though hashstats -l at least prints the files.

lorddoskias commented 3 years ago

@khimaros How large is your dupermove.hashes? I just tested with a fresh ver3 hash files (your is also ver3) and hashstat did print the checksums:

#./hashstats  test.db 
Raw header info for "test.db":
  version: 3.0  block_size: 131072
  num_files: 2  num_hashes: 4
Print top 10 hashes (this may take some time)
Hash, # Blocks, # Files
9f8fb2b405f1d5ba2536a893fb389e98, 64, 2
d66ef8d8e8989acbd32b09bf1e7607c6, 64, 2
JackSlateur commented 1 year ago

Hello, I believe this issue is fixed: hashstats works on both the "v2" and the "v3" hashfile format

Feel free to reopen if you still encounter the issue