From a609acdbcc7f867d3f6844b8b58ae14664172211 Mon Sep 17 00:00:00 2001 From: Remi Gacogne Date: Mon, 19 Mar 2018 16:37:45 +0100 Subject: [PATCH] dnsdist: Document setRingBuffersLockRetries() --- pdns/dnsdist-console.cc | 2 +- pdns/dnsdistdist/docs/reference/config.rst | 14 ++++++++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/pdns/dnsdist-console.cc b/pdns/dnsdist-console.cc index 50d48a0148..735e3c8467 100644 --- a/pdns/dnsdist-console.cc +++ b/pdns/dnsdist-console.cc @@ -403,7 +403,7 @@ const std::vector 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'" }, diff --git a/pdns/dnsdistdist/docs/reference/config.rst b/pdns/dnsdistdist/docs/reference/config.rst index 06ec597edd..38f5fa8cf5 100644 --- a/pdns/dnsdistdist/docs/reference/config.rst +++ b/pdns/dnsdistdist/docs/reference/config.rst @@ -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 ------- -- 2.47.2