From 3b38e4b8344cb3bb28f2b116d2e39f8371ef8e34 Mon Sep 17 00:00:00 2001 From: Mukund Sivaraman Date: Wed, 26 Apr 2017 23:43:35 +0530 Subject: [PATCH] Set a LMDB mapsize and also provide a config option to control it (#44954) (cherry picked from commit 241b49e6119eb37eebe2de98f0e8bde436074cb3) --- CHANGES | 7 ++ bin/named/config.c | 1 + bin/named/named.conf.docbook | 6 +- bin/named/server.c | 71 +++++++++++++++++-- .../checkconf/bad-lmdb-mapsize-bogus.conf | 11 +++ .../checkconf/bad-lmdb-mapsize-toolarge.conf | 11 +++ .../checkconf/bad-lmdb-mapsize-toosmall.conf | 11 +++ .../checkconf/bad-lmdb-mapsize-unlimited.conf | 11 +++ .../checkconf/good-lmdb-mapsize-largest.conf | 11 +++ .../checkconf/good-lmdb-mapsize-smallest.conf | 11 +++ doc/arm/Bv9ARM-book.xml | 48 +++++++++++++ doc/misc/options | 2 + lib/bind9/check.c | 25 +++++++ lib/dns/include/dns/view.h | 2 +- lib/dns/view.c | 12 +++- lib/isccfg/include/isccfg/grammar.h | 3 + lib/isccfg/namedconf.c | 6 ++ lib/isccfg/parser.c | 7 ++ 18 files changed, 245 insertions(+), 11 deletions(-) create mode 100644 bin/tests/system/checkconf/bad-lmdb-mapsize-bogus.conf create mode 100644 bin/tests/system/checkconf/bad-lmdb-mapsize-toolarge.conf create mode 100644 bin/tests/system/checkconf/bad-lmdb-mapsize-toosmall.conf create mode 100644 bin/tests/system/checkconf/bad-lmdb-mapsize-unlimited.conf create mode 100644 bin/tests/system/checkconf/good-lmdb-mapsize-largest.conf create mode 100644 bin/tests/system/checkconf/good-lmdb-mapsize-smallest.conf diff --git a/CHANGES b/CHANGES index 1666253015..cb23dc4a12 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,10 @@ +4611. [bug] The default LMDB mapsize was too low and caused + errors after few thousand zones were added using + rndc addzone. A new config option "lmdb-mapsize" + has been introduced to configure the LMDB + mapsize depending on operational needs. + [RT #44954] + 4609. [cleanup] Rearrange makefiles to enable parallel execution (i.e. "make -j"). [RT #45078] diff --git a/bin/named/config.c b/bin/named/config.c index 7eacf7ecd7..c70ebd934f 100644 --- a/bin/named/config.c +++ b/bin/named/config.c @@ -178,6 +178,7 @@ options {\n\ zero-no-soa-ttl-cache no;\n\ nsec3-test-zone no;\n\ allow-new-zones no;\n\ + lmdb-mapsize 32M;\n\ fetches-per-server 0;\n\ require-server-cookie no;\n\ v6-bias 50;\n\ diff --git a/bin/named/named.conf.docbook b/bin/named/named.conf.docbook index 03f592dc88..234bc8d20a 100644 --- a/bin/named/named.conf.docbook +++ b/bin/named/named.conf.docbook @@ -1,5 +1,5 @@