+ /*
+ * Up the number of locks we're allowed at once. We base this on
+ * the maximum number of keys we're going to return.
+ */
+ maxlocks = config.maxkeys * 16;
+ if (maxlocks < 1000) {
+ maxlocks = 1000;
+ }
+ dbenv->set_lk_max_locks(dbenv, maxlocks);
+ dbenv->set_lk_max_objects(dbenv, maxlocks);
+