[tracker] libtracker-direct: Ignore error on passive WAL checkpoint



commit 46043ac52387cd6dc9c677f9580dfd4720245c86
Author: Carlos Garnacho <carlosg gnome org>
Date:   Sun Sep 30 12:48:25 2018 +0200

    libtracker-direct: Ignore error on passive WAL checkpoint
    
    The sqlite3_wal_checkpoint_v2() docs don't seem very clear on
    whether SQLITE_BUSY may be returned on passive checkpoints (In
    fact, I seem to read the opposite).
    
    But that seems to happen in practice. Since a passive checkpoint
    is failable in essence, just ignore the error.

 src/libtracker-direct/tracker-direct.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/src/libtracker-direct/tracker-direct.c b/src/libtracker-direct/tracker-direct.c
index 7a26f2064..3dee1bc8b 100644
--- a/src/libtracker-direct/tracker-direct.c
+++ b/src/libtracker-direct/tracker-direct.c
@@ -193,7 +193,9 @@ wal_checkpoint (TrackerDBInterface *iface,
        GError *error = NULL;
 
        g_debug ("Checkpointing database...");
-       tracker_db_interface_sqlite_wal_checkpoint (iface, blocking, &error);
+
+       tracker_db_interface_sqlite_wal_checkpoint (iface, blocking,
+                                                   blocking ? &error : NULL);
 
        if (error) {
                g_warning ("Error in WAL checkpoint: %s", error->message);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]