After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 645046 - Sqlite database growing continuously
Sqlite database growing continuously
Status: RESOLVED OBSOLETE
Product: tracker
Classification: Core
Component: Store
0.10.x
Other Linux
: Normal major
: ---
Assigned To: tracker-general
Jamie McCracken
Depends on:
Blocks:
 
 
Reported: 2011-03-17 17:20 UTC by Lionel Landwerlin
Modified: 2021-05-26 22:25 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Lionel Landwerlin 2011-03-17 17:20:24 UTC
Hi,

I've been moving files in and out of indexed directories to trigger update events on the tracker-store, and I noticed that the database is growing though the number of files within the store does not grow.

Basically, what I do is executing that script :


movein=1
while true; do
    if [ $movein = "1" ]; then
        echo "mv ~/work/perso/ ~/Pictures/"
        mv ~/work/perso/ ~/Pictures/
        movein=0
    else
        echo "mv ~/Pictures/perso/ ~/work/"
        mv ~/Pictures/perso/ ~/work/
        movein=1
    fi
    sleep 6
done

which moves my 'perso' directory in and out of the tracker's radars.
That directory contains about 400 pictures from my camera :

-rw-r--r-- 1 user user    1791495 Mar  9 18:07 IMG_0059.JPG
/home/user/Pictures/perso/IMG_0059.JPG: JPEG image data, EXIF standard 2.3

And about 30 video files (from the same camera) :

-rw-r--r-- 1 user user   37202588 Mar  9 18:08 MVI_0230.MOV
/home/user/Pictures/perso/MVI_0230.MOV: ISO Media, Apple QuickTime movie

And about 10 video files (mostly divx/xvid) :

-rw-r--r-- 1 user user   13172252 Mar 12 20:23 Sample.avi
/home/user/Pictures/perso/Sample.avi: RIFF (little-endian) data, AVI, 720 x 304, 25.00 fps, video: XviD, audio: Dolby AC3 (5 channels, 48000 Hz)

After a day of running that script, this is how is the database :

$ du -sh ~/.cache/tracker/*
4.0K	/home/user/.cache/tracker/db-locale.txt
4.0K	/home/user/.cache/tracker/db-version.txt
4.0K	/home/user/.cache/tracker/first-index.txt
4.0K	/home/user/.cache/tracker/last-crawl.txt
35M	/home/user/.cache/tracker/meta.db
4.5M	/home/user/.cache/tracker/meta.db-shm
577M	/home/user/.cache/tracker/meta.db-wal
4.0K	/home/user/.cache/tracker/miner-applications-locale.txt
344K	/home/user/.cache/tracker/ontologies.gvdb

Now if I kill tracker and rip off the database (tracker-control -k -r) and restart the indexation :

$ du -sh ~/.cache/tracker/*
4.0K	/home/user/.cache/tracker/db-locale.txt
4.0K	/home/user/.cache/tracker/db-version.txt
4.0K	/home/user/.cache/tracker/first-index.txt
4.0K	/home/user/.cache/tracker/last-crawl.txt
3.4M	/home/user/.cache/tracker/meta.db
32K	/home/user/.cache/tracker/meta.db-shm
1.2M	/home/user/.cache/tracker/meta.db-wal
4.0K	/home/user/.cache/tracker/miner-applications-locale.txt
344K	/home/user/.cache/tracker/ontologies.gvdb
Comment 1 Jürg Billeter 2011-03-21 10:07:59 UTC
As mainly the meta.db-wal file grows but not the meta.db file, I suspect that an open SQLite cursor is blocking SQLite from writing the changes in the write-ahead log back into the main database file. A leaked cursor could be responsible for this. Please let us know if this happens only while accessing tracker from external applications as this would mean that they are leaking cursors.
Comment 2 Lionel Landwerlin 2011-03-21 11:24:57 UTC
The du command has been run without any application currently running and tracker (apart from tracker itself).

Does that answer your question ?
Comment 3 Sam Thursfield 2021-05-26 22:25:23 UTC
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org.
As part of that, we are mass-closing older open tickets in bugzilla.gnome.org
which have not seen updates for a longer time (resources are unfortunately
quite limited so not every ticket can get handled).

If you can still reproduce the situation described in this ticket in a recent
and supported software version, then please follow
  https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines
and create a new enhancement request ticket at
  https://gitlab.gnome.org/GNOME/tracker/-/issues/

Thank you for your understanding and your help.