Bug 412574

Summary: New images are not recognized when externally added to a DK folder
Product: [Applications] digikam Reporter: Kusi <kusi>
Component: Database-ScanAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED WORKSFORME    
Severity: normal CC: kusi, metzpinguin, qrczakoff
Priority: NOR    
Version: 6.3.0   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In: 6.4.0

Description Kusi 2019-10-03 18:57:35 UTC
SUMMARY
DK's watchdog (I guess through the inotify API) for folders does not work anymore. A file added to a folder known to DK is not recognized by a running DK session anymore, as it was the case for DK 5.x


STEPS TO REPRODUCE
1. Start DK
2. Copy a file (e.g via Dolphin) to an Album which is known to Digikam
3. DK does not immediately recognize the newly added file, but only on restart or on launching the maintenance tool

SOFTWARE/OS VERSIONS
Digikam: 6.3
Opensuse: 15.1
KDE Frameworks Version: 5.55.0
Qt Version: 5.9.7
Comment 1 Maik Qualmann 2019-10-03 19:29:11 UTC
This feature is now configurable. The option is located in the digiKam settings under collections. Remember, this feature also has many disadvantages. Activate it only if you absolutely need external changes on a regular basis.

Maik
Comment 2 Kusi 2019-10-03 21:01:33 UTC
Thanks Maik, missed this option. What are the disadvantages?
Comment 3 Maik Qualmann 2019-10-03 21:19:55 UTC
The QFileSystemwatcher needs system (kernel) resources, these are finite. On some systems, only 255 albums can be monitored. Also on a modern Linux system is ending after a few 10 thousand albums. Under OSX, he slows down the launch of digiKam by several minutes. Otherwise it can slow down digiKam, because internal file changes trigger an event.

If you want to copy with Dolphin, mark files in Dolphin and use Paste in the digiKam window. DigiKam also automatically copies any available sidecar files completely automatically.

Maik
Comment 4 Kusi 2019-10-03 21:29:43 UTC
Interesting. In this case, it would be great to make the directories to be watched configurable. For example, I only need the folder 2019 to be watched for new files.
Comment 5 Maik Qualmann 2019-10-04 05:49:59 UTC
*** Bug 412590 has been marked as a duplicate of this bug. ***
Comment 6 Kusi 2019-10-06 09:44:36 UTC
It turns out that a cloud sync service I've installed has automatically set fs.inotify.max_user_watches=1048576 in /etc/sysctrl.conf. This is enough to also include my Digikam setup. Apart from using more memory, I didn't experience any issues so far (no increased startup time on Linux)