maxreaders/maxsize was not re-opening because cleanup call was missing
online indexer should abort txn after index failure
if ( rc == 0 ) {
rc = mdb_txn_commit( txn );
txn = NULL;
+ } else {
+ mdb_txn_abort( txn );
+ txn = NULL;
}
if ( rc )
break;
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;
}