[tracker] tracker-store: Check wal threadpool existence before using it
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker] tracker-store: Check wal threadpool existence before using it
- Date: Sun, 16 Jul 2017 17:59:11 +0000 (UTC)
commit 2b0ad4b297c0d7dc31296fb1dadae3b092e9898b
Author: Carlos Garnacho <carlosg gnome org>
Date: Sun Jul 16 19:53:13 2017 +0200
tracker-store: Check wal threadpool existence before using it
During shutdown the thread pool might be actually gone. Do not try to poke
it in those situations, a blocking wal checkpoint will happen eventually.
src/tracker-store/tracker-store.vala | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/tracker-store/tracker-store.vala b/src/tracker-store/tracker-store.vala
index 801a539..1f58256 100644
--- a/src/tracker-store/tracker-store.vala
+++ b/src/tracker-store/tracker-store.vala
@@ -274,7 +274,7 @@ public class Tracker.Store {
// do immediate checkpointing (blocking updates)
// to prevent excessive wal file growth
wal_checkpoint (wal_iface, true);
- } else if (n_pages >= 1000) {
+ } else if (n_pages >= 1000 && checkpoint_pool != null) {
if (AtomicInt.compare_and_exchange (ref checkpointing, 0, 1)) {
// initiate asynchronous checkpointing (not blocking updates)
try {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]