]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
dnsdist: Document setRingBuffersLockRetries()
authorRemi Gacogne <remi.gacogne@powerdns.com>
Mon, 19 Mar 2018 15:37:45 +0000 (16:37 +0100)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Thu, 29 Mar 2018 09:37:51 +0000 (11:37 +0200)
pdns/dnsdist-console.cc
pdns/dnsdistdist/docs/reference/config.rst

index 50d48a014832a7da52994e8e4343d6ccb782f138..735e3c846739d4ba72c3a35305d1e573598d2b4f 100644 (file)
@@ -403,7 +403,7 @@ const std::vector<ConsoleKeyword> g_consoleKeywords{
   { "setQueryCount", true, "bool", "set whether queries should be counted" },
   { "setQueryCountFilter", true, "func", "filter queries that would be counted, where `func` is a function with parameter `dq` which decides whether a query should and how it should be counted" },
   { "setRingBuffersLockRetries", true, "n", "set the number of attempts to get a non-blocking lock to a ringbuffer shard before blocking" },
-  { "setRingBuffersSize", true, "n", "set the capacity of the ringbuffers used for live traffic inspection to `n`" },
+  { "setRingBuffersSize", true, "n [, numberOfShards]", "set the capacity of the ringbuffers used for live traffic inspection to `n`, and optionally the number of shards to use to `numberOfShards`" },
   { "setRules", true, "list of rules", "replace the current rules with the supplied list of pairs of DNS Rules and DNS Actions (see `newRuleAction()`)" },
   { "setServerPolicy", true, "policy", "set server selection policy to that policy" },
   { "setServerPolicyLua", true, "name, function", "set server selection policy to one named 'name' and provided by 'function'" },
index 06ec597eddadb32818ff5398223cae4ac41adad7..38f5fa8cf532e7c099b95138dd4bd775f2a0e24f 100644 (file)
@@ -251,11 +251,21 @@ EDNS Client Subnet
 Ringbuffers
 ~~~~~~~~~~~
 
-.. function:: setRingBuffersSize(num)
+.. function:: setRingBuffersLockRetries(num)
+  .. versionadded:: 1.3.0
+
+  Set the number of shards to attempt to lock without blocking before giving up and simply blocking while waiting for the next shard to be available
+
+  :param int num: The maximum number of attempts. Defaults to 5 if there are more than one shard, 0 otherwise.
+
+.. function:: setRingBuffersSize(num [, numberOfShards])
+  .. versionchanged:: 1.3.0
+    ``numberOfShards`` optional parameter added.
 
-  Set the capacity of the ringbuffers used for live traffic inspection to ``num``
+  Set the capacity of the ringbuffers used for live traffic inspection to ``num``, and the number of shards to ``numberOfShards`` if specified.
 
   :param int num: The maximum amount of queries to keep in the ringbuffer. Defaults to 10000
+  :param int numberOfShards: the number of shards to use to limit lock contention. Defaults to 1
 
 Servers
 -------