Home of the Squeezebox™ & Transporter® network music players.
Page 1 of 20 12311 ... LastLast
Results 1 to 10 of 199
  1. #1
    Administrator andyg's Avatar
    Join Date
    Jan 2006
    Location
    Pittsburgh, PA
    Posts
    7,396

    SQLite WAL in 7.6.1 - please test

    I've made a rather large change in 7.6.1 today: SQLite now runs in WAL mode (see here for the gory technical details):

    * Server and standalone scanner now share the same set of 3 database files (squeezebox.db, squeezebox-persistent.db, and ArtworkCache.db). No more copying back and forth to "-scanner" files, etc.
    * "Database is locked" errors while scanning should go away.
    * locking_mode=EXCLUSIVE has been removed.
    * You can see and use changes in the database while the scanner is running, the way it used to be.

    Also, I found a bug in the persistent table during this work, the 'added' column was storing the file's modification timestamp instead of the time when the file was originally added. I had to fix this in order to get the scanner to work right for new files. Hopefully this will not cause any issues with plugins.

  2. #2
    Senior Member erland's Avatar
    Join Date
    Dec 2005
    Location
    Sweden
    Posts
    10,315
    Quote Originally Posted by andyg View Post
    Also, I found a bug in the persistent table during this work, the 'added' column was storing the file's modification timestamp instead of the time when the file was originally added. I had to fix this in order to get the scanner to work right for new files. Hopefully this will not cause any issues with plugins.
    I suspect I'm the only one using it (in TrackStat) and I copy it to the separate TrackStat tables initially and I think I really want to be the time when the file was added, so I think your change should be fine.

    However, earlier when I looked at the LMS schema it looked like it also had a "added_time" column in the "tracks" table besides the "tracks_persistent.added" column, is that intentional or just a mistake ?
    I posted a thread about it earlier but never got any response:
    http://forums.slimdevices.com/showthread.php?t=87579
    Erland Isaksson (My homepage)
    (Developer of many plugins/applets (both free and commercial).
    If you like to encourage future presence on this forum and/or third party plugin/applet development, consider purchasing some plugins)
    You may also want to try my Android apps Squeeze Display and RSS Photo Show
    Interested in the future of music streaming ? ickStream - A world of music at your fingertips.

  3. #3
    Senior Member
    Join Date
    Jun 2009
    Posts
    306
    Quote Originally Posted by andyg View Post
    I've made a rather large change in 7.6.1 today
    When You're talking about 7.6.1 these days it's "automatically"in 7.7.0 (LMS), too?

  4. #4
    Senior Member
    Join Date
    May 2009
    Location
    Denmark (Struer)
    Posts
    797
    Quote Originally Posted by frank1969 View Post
    When You're talking about 7.6.1 these days it's "automatically"in 7.7.0 (LMS), too?
    It is merged to 7.7 http://svn.slimdevices.com/slim/7.7/?view=log
    Main: Receiver (Audiocom) -> Beresford Caiman+ (Gatorized) -> Carver A-500x -> B&W 704
    Office: Receiver -> Luxman L-210 -> Stax SR84 Pro
    -> Beresford Caiman (Gatorized) -> Superlux HD668B
    Server: A8-5500, 4 GB, SSD+ 2*1 TB, Win8 w. SBS 7.8 (SQLite w. High Mem)
    Tied together by D-Link DIR-655 + DGS-1008D

  5. #5
    Senior Member
    Join Date
    Apr 2005
    Location
    Colorado
    Posts
    10,073
    Mmmm... Not good. I just ran a full rescan. Note the numbers shown below. It apparently attempted to scan 32,712 files, which is the correct number of Flac files in my library, but only ended up with 16,372.

    Code:
    Total Tracks: 16,372
    Total Albums: 1,659
    Total Artists: 703
    Total Genres: 32
    Total Playing Time: 1228:19:22
    
    Music Scan Details
    Discovering files: D:\slim\65\music   (1 of 1)   Complete  00:00:00
    Discovering files: E:\Flac   (36548 of 36548)   Complete  00:00:31
    Scanning new files: E:\Flac   (32712 of 32712)   Complete  00:10:24
    Discovering playlists: D:\slim\65\playlists   (5 of 5)   Complete  00:00:00
    Scanning new playlists: D:\slim\65\playlists   (4 of 4)   Complete  00:00:02
    Pre-caching Artwork   (1736 of 1736)   Complete  00:05:03
    
    The server has finished scanning your music collection.
    Total Time: 00:16:00 (Monday, August 8, 2011 / 12:51 PM)
    Here's what the library stats should look like:

    Code:
    Total Tracks: 32,712
    Total Albums: 2,711
    Total Artists: 898
    Total Genres: 36
    Total Playing Time: 2449:19:39
    Nothing in the scanner.log. I'll enable debugging and try again.
    Last edited by JJZolx; 2011-08-08 at 12:08.

  6. #6
    Senior Member
    Join Date
    Apr 2005
    Location
    Colorado
    Posts
    10,073
    Exact same library stats after the second run. No errors in the logs. There are only 16,362 'Handling new track' entries in the scanner.log. Looking at the database I see 16,362 files scanned in order, then 10 files added to the end, which I presume are files that were skipped and then added when the playlists were scanned.

    Looking at the logs and the database, it appears that either the first or last N files from an album/folder are being skipped. I don't see any albums where random tracks were skipped.

    Since the album count also comes up short, there must also be entire folders being skipped.

    Code:
    [11-08-08 13:15:50.8398] Slim::Utils::Scanner::Local::new (744) Handling new track file:///E:/Flac/Vangelis/Blade%20Runner/09%20Tales%20Of%20The%20Future.flac
    [11-08-08 13:15:50.8442] Slim::Utils::Scanner::Local::new (744) Handling new track file:///E:/Flac/Vangelis/Blade%20Runner/10%20Damask%20Rose.flac
    [11-08-08 13:15:50.8575] Slim::Utils::Scanner::Local::new (744) Handling new track file:///E:/Flac/Vangelis/Blade%20Runner/11%20Blade%20Runner%20(End%20Titles).flac
    [11-08-08 13:15:50.8668] Slim::Utils::Scanner::Local::new (744) Handling new track file:///E:/Flac/Vangelis/Blade%20Runner/12%20Tears%20In%20Rain.flac
    [11-08-08 13:15:52.5405] Slim::Utils::Scanner::Local::new (744) Handling new track file:///E:/Flac/Velvet%20Underground/The%20Velvet%20Underground/06%20Beginning%20To%20See%20The%20Light.flac
    [11-08-08 13:15:52.5570] Slim::Utils::Scanner::Local::new (744) Handling new track file:///E:/Flac/Velvet%20Underground/The%20Velvet%20Underground/07%20I%27m%20Set%20Free.flac
    [11-08-08 13:15:52.5633] Slim::Utils::Scanner::Local::new (744) Handling new track file:///E:/Flac/Velvet%20Underground/The%20Velvet%20Underground/08%20That%27s%20The%20Story%20Of%20My%20Life.flac
    [11-08-08 13:15:52.5743] Slim::Utils::Scanner::Local::new (744) Handling new track file:///E:/Flac/Velvet%20Underground/The%20Velvet%20Underground/09%20The%20Murder%20Mystery.flac
    [11-08-08 13:15:52.5790] Slim::Utils::Scanner::Local::new (744) Handling new track file:///E:/Flac/Velvet%20Underground/The%20Velvet%20Underground/10%20After%20Hours.flac
    Code:
    [11-08-08 13:15:47.6621] Slim::Utils::Scanner::Local::new (744) Handling new track file:///E:/Flac/Van%20Morrison/Hymns%20to%20the%20Silence/Disc%202/07%20Green%20Mansions.flac
    [11-08-08 13:15:47.6715] Slim::Utils::Scanner::Local::new (744) Handling new track file:///E:/Flac/Van%20Morrison/Hymns%20to%20the%20Silence/Disc%202/08%20Pagan%20Streams.flac
    [11-08-08 13:15:48.7654] Slim::Utils::Scanner::Local::new (744) Handling new track file:///E:/Flac/Van%20Morrison/Moondance/07%20These%20Dreams%20Of%20You.flac
    [11-08-08 13:15:48.7848] Slim::Utils::Scanner::Local::new (744) Handling new track file:///E:/Flac/Van%20Morrison/Moondance/08%20Brand%20New%20Day.flac
    [11-08-08 13:15:48.7994] Slim::Utils::Scanner::Local::new (744) Handling new track file:///E:/Flac/Van%20Morrison/Moondance/09%20Everyone.flac
    [11-08-08 13:15:48.8089] Slim::Utils::Scanner::Local::new (744) Handling new track file:///E:/Flac/Van%20Morrison/Moondance/10%20Glad%20Tidings.flac

  7. #7
    Senior Member
    Join Date
    Apr 2005
    Location
    Colorado
    Posts
    10,073
    Here's something odd looking. For the main squeeebox.db database file there are two sets of -shm and -wal files. One set using a name derived from a Window 8.3 type filename and one set from the full file name.

    I just wiped the cache clean to launch a new full scan. Previously the -shm and -wal files for the ArtworkCache.db were also using 8.3 type filenames.
    Attached Images Attached Images  

  8. #8
    Senior Member
    Join Date
    Sep 2010
    Posts
    245
    scan worked fine for me (22k tracks) both clear/scan or search new files. I saw no change. More or less the same elaspsed time.

  9. #9

    SQLite WAL in 7.6.1 - please test

    On Mon, 08 Aug, reniera wrote:

    > scan worked fine for me (22k tracks) both clear/scan or search new
    > files. I saw no change. More or less the same elaspsed time.


    Worked for me as well. Same reported data as before. Time went down
    from 2 minutes 10 seconds to 1 minute 50 seconds on my i3 powered amd64
    Debian GNU/Linux machine for my 9500 tracks library.

    --
    Stefan Bellon

  10. #10
    Senior Member
    Join Date
    Apr 2005
    Location
    Colorado
    Posts
    10,073
    Is it working for anyone on Windows?

    I have a feeling that as long as scanner.pl uses Windows 8.3 filenames, things aren't going to work, although I have no idea whether that had anything to do with the missing tracks problem I reported previously.

    After I cleared the cache, the initial scan never completed. Looks like the transaction may never have been successfully committed, as the .db-wal file was 40+ MB, but squeezebox.db was very small. The server reports no library configured. It appears that if you begin with an empty cache, then SBS creates the databases, and the .db-shm and .db-wal files for them use full filenames. Then when the external scanner is launched the 8.3 filename versions of .db-shm and .db-wal are created and used during the full scan.
    Last edited by JJZolx; 2011-08-08 at 16:13.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •