+2797. [bug] Don't decrement the dispatch manager's maxbuffers.
+ [RT #20613]
+
2790. [bug] Handle DS queries to stub zones. [RT #20440]
2786. [bug] Additional could be promoted to answer. [RT #20663]
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: dispatch.c,v 1.137.128.24 2009/01/31 00:44:43 marka Exp $ */
+/* $Id: dispatch.c,v 1.137.128.25 2009/12/02 23:32:38 marka Exp $ */
/*! \file */
/* Create or adjust buffer pool */
if (mgr->bpool != NULL) {
- isc_mempool_setmaxalloc(mgr->bpool, maxbuffers);
- mgr->maxbuffers = maxbuffers;
+ /*
+ * We only increase the maxbuffers to avoid accidental buffer
+ * shortage. Ideally we'd separate the manager-wide maximum
+ * from per-dispatch limits and respect the latter within the
+ * global limit. But at this moment that's deemed to be
+ * overkilling and isn't worth additional implementation
+ * complexity.
+ */
+ if (maxbuffers > mgr->maxbuffers) {
+ isc_mempool_setmaxalloc(mgr->bpool, maxbuffers);
+ mgr->maxbuffers = maxbuffers;
+ }
} else {
result = isc_mempool_create(mgr->mctx, buffersize, &mgr->bpool);
if (result != ISC_R_SUCCESS) {