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

[tor-commits] [tor/release-0.3.1] If out-of-disk when saving a consensus cache entry, don't BUG.



commit 9c2bc441f8acf6fb47c7cc1f09c04974ee35d694
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date:   Fri Jan 26 13:14:14 2018 -0500

    If out-of-disk when saving a consensus cache entry, don't BUG.
    
    Just warn instead.
    
    Fixes bug 24859.
---
 changes/bug24859     | 4 ++++
 src/or/consdiffmgr.c | 5 ++++-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/changes/bug24859 b/changes/bug24859
new file mode 100644
index 000000000..122109d65
--- /dev/null
+++ b/changes/bug24859
@@ -0,0 +1,4 @@
+  o Minor bugfixes (logging):
+    - Don't treat inability to store a cached consensus object as a
+      bug: it can happen normally when we are out of disk space.
+      Fixes bug 24859; bugfix on 0.3.1.1-alpha.
diff --git a/src/or/consdiffmgr.c b/src/or/consdiffmgr.c
index c5f55b6f3..e2bb31e52 100644
--- a/src/or/consdiffmgr.c
+++ b/src/or/consdiffmgr.c
@@ -1310,8 +1310,11 @@ store_multiple(consensus_cache_entry_handle_t **handles_out,
                             labels,
                             body_out,
                             bodylen_out);
-      if (BUG(ent == NULL))
+      if (ent == NULL) {
+        log_warn(LD_FS, "Unable to store object %s compressed with %s.",
+                 description, methodname);
         continue;
+      }
 
       status = CDM_DIFF_PRESENT;
       handles_out[i] = consensus_cache_entry_handle_new(ent);



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits