]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Comment fixes, some of them only made sense for the non-shared setup
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Mon, 25 Mar 2024 13:34:28 +0000 (14:34 +0100)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Mon, 25 Mar 2024 13:34:28 +0000 (14:34 +0100)
pdns/recursordist/nod.cc
pdns/recursordist/nod.hh

index 4aae73d97aeb30901c65ec9c408449daeb819752..75aed78a056c49b047a5f8f901f4f9a3f229eb95 100644 (file)
@@ -50,11 +50,11 @@ void PersistentSBF::remove_tmp_files(const filesystem::path& path, std::lock_gua
   }
 }
 
-// This looks for an old (per-thread) snapshot. The first one it finds,
-// it restores from that. Then immediately snapshots with the current thread id,// before removing the old snapshot
-// In this way, we can have per-thread SBFs, but still snapshot and restore.
-// The mutex has to be static because we can't have multiple (i.e. per-thread)
-// instances iterating and writing to the cache dir at the same time
+// This looks for the newest (per-thread) snapshot it can find and it restores from that. Then
+// immediately snapshots with the current thread id, before removing the old snapshot.
+// In this way, we can have per-thread SBFs, but still snapshot and restore.  The mutex has to be
+// static because we can't have multiple (i.e. per-thread) instances iterating and writing to the
+// cache dir at the same time
 bool PersistentSBF::init(bool ignore_pid)
 {
   auto log = g_slog->withName("nod");
index 2a5bb3edf49dcf2ffd59bf6dec0cc86f60cf164e..fb59c351005499433bf0cd852c63f0ef6e281292 100644 (file)
@@ -55,13 +55,11 @@ public:
   bool snapshotCurrent(std::thread::id tid); // Write the current file out to disk
   void add(const std::string& data)
   {
-    // The only time this should block is when snapshotting
     d_sbf.lock()->add(data);
   }
   bool test(const std::string& data) { return d_sbf.lock()->test(data); }
   bool testAndAdd(const std::string& data)
   {
-    // The only time this should block is when snapshotting
     return d_sbf.lock()->testAndAdd(data);
   }