Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions docs/backends/lmdb.rst
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,9 @@ Defaults to 100 on 32 bit systems, and 16000 on 64 bit systems.

.. versionchanged:: 5.1.0

From version 5.1.0 onwards, this settings only applies to the main database
file; shards use :ref:`settings-lmdb-shards-map-size` instead.
From version 5.1.0 onwards, the size of the main database and the
size of the shard databases can be set independently.
In order to set a different size for the shard databases, use :ref:`settings-lmdb-shards-map-size`.

.. _settings-lmdb-shards-map-size:

Expand Down
4 changes: 4 additions & 0 deletions pdns/dnsdistdist/dnsdist-lbpolicies.hh
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include <memory>
#include <optional>
#include <vector>
#include <stdexcept>

struct dnsdist_ffi_servers_list_t;
struct dnsdist_ffi_server_t;
Expand Down Expand Up @@ -87,6 +88,9 @@ public:

DownstreamState* operator->() const
{
if (!d_selected.has_value()) {
throw std::runtime_error("Trying to access an invalid SelectedBackend");
}
return (*d_backends)[*d_selected].second.get();
}

Expand Down
2 changes: 1 addition & 1 deletion pdns/dnsdistdist/dnsdist.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1498,7 +1498,7 @@ static ServerPolicy::SelectedBackend selectBackendForOutgoingQuery(DNSQuestion&
const auto& servers = serverPool.getServers();
auto selectedBackend = policy.getSelectedBackend(servers, dnsQuestion);

if (closer) {
if (closer && selectedBackend) {
closer->setAttribute("backend.name", AnyValue{selectedBackend->getNameWithAddr()});
closer->setAttribute("backend.id", AnyValue{boost::uuids::to_string(selectedBackend->getID())});
}
Expand Down
Loading