fsearch icon indicating copy to clipboard operation
fsearch copied to clipboard

[BUG] FSearch keeps de-indexing all files from unmounted external HDD while updating database

Open anupam207 opened this issue 3 years ago • 6 comments

OS: Ubuntu 20.04.2 LTS, 64-bit FSearch version: 0.1beta4, (fsearch-trunk package, version 20210602+r1264.c7a2c34~ubuntu20.04.1, installed from the FSearch Daily Builds PPA)

I have multiple folders from multiple external HDDs included in the FSearch database. I often need to search for a file to check where it's located even when the HDDs themselves are not mounted. But very recently (for last 1-2 days), after an update, I started experiencing this new behaviour as described below.

Steps:

  1. Mount an external HDD (if needed, specifically at /media/<user-name>/). Add a single or multiple folder(s) belonging to the external HDD to FSearch database.
  2. Update database.
  3. Remove the external HDD.
  4. Update database once again.

What happens:

  1. After step 2, when searched for, FSearch correctly lists files/folders belonging to the external HDD. They can be launched directly from the FSearch window.
  2. After step 3, FSearch keeps listing files/folders belonging to the external HDD still as "active" entries (i.e. not greyed out). Obviously they cannot be launched anymore. (In general, if a file/folder is deleted/moved/renamed after updating the database, FSearch keeps listing it as an "active" entry.)
  3. After step 4, FSearch doesn't list any files/folders belonging to the external HDD at all.

What used to happen (expected behaviour):

  1. After step 2, when searched for, FSearch correctly lists files/folders belonging to the external HDD. They can be launched directly from the FSearch window.
  2. After step 3, FSearch keeps listing files/folders belonging to the external HDD, but as "inactive" (greyed out) entries. Obviously they cannot be launched anymore. (In general, if a file/folder is deleted/moved/renamed after updating the database, FSearch would correctly list it as an "inactive" entry / missing item.)
  3. After step 4, FSearch keeps listing files/folders belonging to the external HDD as "inactive" entries.

I looked hard, but couldn't find a configuration option to stop de-indexing files from unmounted external HDDs while updating the database. Is there any way to revert to the old behaviour?

anupam207 avatar Jun 03 '21 13:06 anupam207

Hi @anupam207,

sorry for the inconvenience. That's a known issue. I released a major update to the database 2 days ago and I simply forgot to add this functionality (to keep old indices if their folders disappear) to the new code. I'm working on this, but it'll take a while.

If you need the old functionality back you should be able to revert to the old version with apt and put it on hold, to stop the system from updating it.

cboxdoerfer avatar Jun 03 '21 13:06 cboxdoerfer

@cboxdoerfer Thanks for the explanation, and also thank you very much for this highly useful application. I have downgraded and put it on hold for now. Please let me know once the issue is resolved so that I would "unhold" it again.

anupam207 avatar Jun 03 '21 15:06 anupam207

Sure, I'll update this issue here once the old functionality is back.

cboxdoerfer avatar Jun 03 '21 15:06 cboxdoerfer

Hi @anupam207,

sorry for the inconvenience. That's a known issue. I released a major update to the database 2 days ago and I simply forgot to add this functionality (to keep old indices if their folders disappear) to the new code. I'm working on this, but it'll take a while.

If you need the old functionality back you should be able to revert to the old version with apt and put it on hold, to stop the system from updating it.

Wow, that would be an amazing feature. i think I noticed this, for me it traversed into a mounted sshfs network share, which is fine, and useful actually. In the end it got a little thrashy so I unmount the sshfs before using fsearch update, but on the whole very useful to also see through my network shares like that.

I suppose it would do this by noting the filesystem boundary / media hotplugging state. And some way to expunge failed disks over time (30 to 90 days?). I think my collection peaked at 26 million records!

tomachinz avatar Dec 07 '21 16:12 tomachinz

It could be nice if this could be resolved. When I reboot my Linux Mint system, I have to "click into" a few of my mounted shares to remount them, and if I happen to open fsearch before that's done, fsearch seems to reindex or drops the previous results it had for items that lived on those shares.

yllekz avatar Feb 28 '24 20:02 yllekz