]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Fix spelling for `setWHashedPerturbation`
authorJosh Soref <2119212+jsoref@users.noreply.github.com>
Tue, 20 May 2025 14:51:03 +0000 (10:51 -0400)
committerJosh Soref <2119212+jsoref@users.noreply.github.com>
Tue, 20 May 2025 14:51:03 +0000 (10:51 -0400)
The goal is to deprecate the misspelled flavor while still supporting it.

.github/actions/spell-check/expect.txt
.github/actions/spell-check/patterns.txt
pdns/dnsdistdist/dnsdist-console.cc
pdns/dnsdistdist/dnsdist-lua-configuration-items.cc
pdns/dnsdistdist/dnsdist-settings-definitions.yml
pdns/dnsdistdist/docs/guides/serverselection.rst

index 763f8527993108a09cd258921357133070101480..3bb5eeaf6aa40c8dc4d434cf0ea3e9e39fae6287 100644 (file)
@@ -1011,7 +1011,6 @@ Peeters
 Pels
 Penev
 Perroud
-Pertubation
 Pfetzing
 pgmysql
 pgmysqlbackend
index b154295b075c596c8891baf80fdf299d73cbb13d..990b28c079024b7bf12d1465dc9706f7f4968bca 100644 (file)
@@ -1,5 +1,8 @@
 # See https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples:-patterns
 
+# deprecated
+setWHashedPertubation
+
 \bcommit [0-9a-f]+\b
 
 # HMAC
index d3542c1ec41774f1f0f9ae972c06ab9672e0e2a9..8459bb6754833eca48e0341533481f06a6e1a7c8 100644 (file)
@@ -793,7 +793,7 @@ static const std::vector<dnsdist::console::ConsoleKeyword> s_consoleKeywords{
   {"setVerboseLogDestination", true, "destination file", "Set a destination file to write the 'verbose' log messages to, instead of sending them to syslog and/or the standard output"},
   {"setWebserverConfig", true, "[{password=string, apiKey=string, customHeaders, statsRequireAuthentication}]", "Updates webserver configuration"},
   {"setWeightedBalancingFactor", true, "factor", "Set the balancing factor for bounded-load weighted policies (whashed, wrandom)"},
-  {"setWHashedPertubation", true, "value", "Set the hash perturbation value to be used in the whashed policy instead of a random one, allowing to have consistent whashed results on different instance"},
+  {"setWHashedPerturbation", true, "value", "Set the hash perturbation value to be used in the whashed policy instead of a random one, allowing to have consistent whashed results on different instance"},
   {"show", true, "string", "outputs `string`"},
   {"showACL", true, "", "show our ACL set"},
   {"showBinds", true, "", "show listening addresses (frontends)"},
index 546f027b20c1512328e4304ca9209cd5169cec55..e482d4767aa014870955cda8d7a13e8be51f7227 100644 (file)
@@ -142,7 +142,8 @@ static const std::map<std::string, UnsignedIntegerImmutableConfigurationItems> s
   {"setDoHDownstreamMaxIdleTime", {[](dnsdist::configuration::ImmutableConfiguration& config, uint64_t newValue) { config.d_outgoingDoHMaxIdleTime = newValue; }, std::numeric_limits<uint16_t>::max()}},
 #endif /* HAVE_DNS_OVER_HTTPS && HAVE_NGHTTP2 */
   {"setMaxUDPOutstanding", {[](dnsdist::configuration::ImmutableConfiguration& config, uint64_t newValue) { config.d_maxUDPOutstanding = newValue; }, std::numeric_limits<uint16_t>::max()}},
-  {"setWHashedPertubation", {[](dnsdist::configuration::ImmutableConfiguration& config, uint64_t newValue) { config.d_hashPerturbation = newValue; }, std::numeric_limits<uint32_t>::max()}},
+  {"setWHashedPertubation" /* Deprecated */, {[](dnsdist::configuration::ImmutableConfiguration& config, uint64_t newValue) { config.d_hashPerturbation = newValue; }, std::numeric_limits<uint32_t>::max()}},
+  {"setWHashedPerturbation", {[](dnsdist::configuration::ImmutableConfiguration& config, uint64_t newValue) { config.d_hashPerturbation = newValue; }, std::numeric_limits<uint32_t>::max()}},
 #ifndef DISABLE_RECVMMSG
   {"setUDPMultipleMessagesVectorSize", {[](dnsdist::configuration::ImmutableConfiguration& config, uint64_t newValue) { config.d_udpVectorSize = newValue; }, std::numeric_limits<uint32_t>::max()}},
 #endif /* DISABLE_RECVMMSG */
index 00267d885df6753cb3c7017c5e3787a53aab87cb..2f6de6f2d1f0fe2d58bf3cf7751a76915bc791d7 100644 (file)
@@ -2090,7 +2090,7 @@ load_balancing_policies:
     - name: "hash_perturbation"
       type: "u32"
       default: "0"
-      lua-name: "setWHashedPertubation"
+      lua-name: "setWHashedPerturbation"
       internal-field-name: "d_hashPerturbation"
       runtime-configurable: false
       description: "Set the hash perturbation value to be used in the ``whashed`` policy instead of a random one, allowing to have consistent ``whashed`` results on different instances"
index 25223f48a42cdaa98e1b0ea773335aaee1a79a94..13c8f659b070e493b1ea09015ecacb58f3e2ae7c 100644 (file)
@@ -45,7 +45,7 @@ For example, if we have two servers, with respective weights of 1 and 4, we expe
 ``whashed`` is a similar weighted policy, but assigns questions with identical hash to identical servers, allowing for better cache concentration ('sticky queries').
 The current hash algorithm is based on the qname of the query.
 
-.. function:: setWHashedPertubation(value)
+.. function:: setWHashedPerturbation(value)
 
   Set the hash perturbation value to be used in the whashed policy instead of a random one, allowing to have consistent whashed results on different instances.
 
@@ -63,7 +63,7 @@ For example, if we have two servers, with respective weights of 1 and 4, we expe
 Increasing the weight of servers to a value larger than the default is required to get a good distribution of queries. Small values like 100 or 1000 should be enough to get a correct distribution.
 This is a side-effect of the internal implementation of the consistent hashing algorithm, which assigns as many points on a circle to a server than its weight, and distributes a query to the server who has the closest point on the circle from the hash of the query's qname. Therefore having very few points, as is the case with the default weight of 1, leads to a poor distribution of queries.
 
-You can also set the hash perturbation value, see :func:`setWHashedPertubation`. To achieve consistent distribution over :program:`dnsdist` restarts, you will also need to explicitly set the backend's UUIDs with the ``id`` option of :func:`newServer`. You can get the current UUIDs of your backends by calling :func:`showServers` with the ``showUUIDs=true`` option.
+You can also set the hash perturbation value, see :func:`setWHashedPerturbation`. To achieve consistent distribution over :program:`dnsdist` restarts, you will also need to explicitly set the backend's UUIDs with the ``id`` option of :func:`newServer`. You can get the current UUIDs of your backends by calling :func:`showServers` with the ``showUUIDs=true`` option.
 
 Since 1.5.0, a bounded-load version is also supported, preventing one server from receiving much more queries than intended, even if the distribution of queries is not perfect. This "consistent hashing with bounded loads" algorithm is enabled by setting :func:`setConsistentHashingBalancingFactor` to a value other than 0, which is the default. This value is the maximum number of outstanding queries that a given server can have at a given time, as a ratio of the total number of outstanding queries for all the active servers in the pool, pondered by the weight of the server.