[Freeipa-devel] [PATCH 0048] Lower minimal connection count for persistent search.
Adam Tkac
atkac at redhat.com
Wed Aug 22 13:37:43 UTC 2012
On Mon, Aug 13, 2012 at 03:31:44PM +0200, Petr Spacek wrote:
> Hello,
>
> As result of better connection management it is possible to run
> persistent search with smaller connection pool.
>
> Attached patch updates built-in configuration checks with new lower
> bound. It closes patch series for
> https://fedorahosted.org/bind-dyndb-ldap/ticket/68:
> Avoid manual connection management outside ldap_query()
Ack
> From 786531c5806331dc0486ed1d877563b00d9219da Mon Sep 17 00:00:00 2001
> From: Petr Spacek <pspacek at redhat.com>
> Date: Mon, 13 Aug 2012 15:24:48 +0200
> Subject: [PATCH] Lower minimal connection count for persistent search.
>
> As result of better connection management is possible
> to run persistent search with smaller connection pool.
>
> Signed-off-by: Petr Spacek <pspacek at redhat.com>
> ---
> src/ldap_helper.c | 14 ++++----------
> 1 file changed, 4 insertions(+), 10 deletions(-)
>
> diff --git a/src/ldap_helper.c b/src/ldap_helper.c
> index fdc629e1c0cd1fabde27d887e391ef81823453c1..01e0a165905163fc955362548b99c0f3501fb37e 100644
> --- a/src/ldap_helper.c
> +++ b/src/ldap_helper.c
> @@ -479,25 +479,19 @@ new_ldap_instance(isc_mem_t *mctx, const char *db_name,
>
> ldap_inst->task = task;
>
> - if (ldap_inst->psearch && ldap_inst->connections < 3) {
> - /* watcher needs one and update_action() can acquire two */
> - log_debug(1, "psearch needs at least 3 connections, "
> + if (ldap_inst->psearch && ldap_inst->connections < 2) {
> + /* watcher needs one and update_*() will request second */
> + log_error("psearch needs at least 2 connections, "
> "increasing limit");
> - ldap_inst->connections = 3;
> + ldap_inst->connections = 2;
> }
> if (ldap_inst->serial_autoincrement == ISC_TRUE
> && ldap_inst->psearch != ISC_TRUE) {
> log_error("SOA serial number auto-increment feature requires "
> "persistent search");
> result = ISC_R_FAILURE;
> goto cleanup;
> }
> - if (ldap_inst->serial_autoincrement == ISC_TRUE
> - && ldap_inst->connections < 4) {
> - log_error("serial_autoincrement needs at least 4 connections, "
> - "increasing limit");
> - ldap_inst->connections = 4;
> - }
>
> CHECK(new_ldap_cache(mctx, argv, &ldap_inst->cache, ldap_inst->psearch));
> CHECK(ldap_pool_create(mctx, ldap_inst->connections, &ldap_inst->pool));
> --
> 1.7.11.2
>
--
Adam Tkac, Red Hat, Inc.
More information about the Freeipa-devel
mailing list