[Freeipa-devel] [PATCH 0036] Raise connection count automatically if serial_autoincrement is enabled

Adam Tkac atkac at redhat.com
Thu Jul 19 11:45:00 UTC 2012


On Wed, Jul 18, 2012 at 01:46:18PM +0200, Petr Spacek wrote:
> Hello,
> 
> this patch reflects new demand from serial_autoincrement feature.
> 
> Generally, change in configuration file should by IPA
> install/upgrade scripts. This patch prevents deadlock in situation
> where scripts failed in their job (as you can see right now).
> 
> Will be obsoleted by https://fedorahosted.org/bind-dyndb-ldap/ticket/68 .

Ack.

> From b41d06248a199e618fd963f32cf16d2c8384276f Mon Sep 17 00:00:00 2001
> From: Petr Spacek <pspacek at redhat.com>
> Date: Wed, 18 Jul 2012 13:39:12 +0200
> Subject: [PATCH] Raise connection count automatically if serial_autoincrement
>  is enabled.
> 
> Signed-off-by: Petr Spacek <pspacek at redhat.com>
> ---
>  src/ldap_helper.c |    6 ++++++
>  1 files changed, 6 insertions(+), 0 deletions(-)
> 
> diff --git a/src/ldap_helper.c b/src/ldap_helper.c
> index 8015db7018ddc9956471a99d6397ab95d83fbc3d..a51a9fe384b7133b06b50a8ff498755d37dafffe 100644
> --- a/src/ldap_helper.c
> +++ b/src/ldap_helper.c
> @@ -480,6 +480,12 @@ new_ldap_instance(isc_mem_t *mctx, const char *db_name,
>  		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.7.6
> 


-- 
Adam Tkac, Red Hat, Inc.




More information about the Freeipa-devel mailing list