From e5864927aead20b9f5703ddfda036052f7f7e453 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Thu, 26 Jul 2012 08:45:39 -0700 Subject: [PATCH] Fix online reconfig maxreaders/maxsize was not re-opening because cleanup call was missing online indexer should abort txn after index failure --- servers/slapd/back-mdb/config.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/servers/slapd/back-mdb/config.c b/servers/slapd/back-mdb/config.c index c0e12044b3..fb516a5dc5 100644 --- a/servers/slapd/back-mdb/config.c +++ b/servers/slapd/back-mdb/config.c @@ -177,6 +177,9 @@ mdb_online_index( void *ctx, void *arg ) if ( rc == 0 ) { rc = mdb_txn_commit( txn ); txn = NULL; + } else { + mdb_txn_abort( txn ); + txn = NULL; } if ( rc ) break; @@ -564,14 +567,18 @@ mdb_cf_gen( ConfigArgs *c ) case MDB_MAXREADERS: mdb->mi_readers = c->value_int; - if ( mdb->mi_flags & MDB_IS_OPEN ) + if ( mdb->mi_flags & MDB_IS_OPEN ) { mdb->mi_flags |= MDB_RE_OPEN; + c->cleanup = mdb_cf_cleanup; + } break; case MDB_MAXSIZE: mdb->mi_mapsize = c->value_ulong; - if ( mdb->mi_flags & MDB_IS_OPEN ) + if ( mdb->mi_flags & MDB_IS_OPEN ) { mdb->mi_flags |= MDB_RE_OPEN; + c->cleanup = mdb_cf_cleanup; + } break; } -- 2.39.5