mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

gbellato
22.00.2009 1cecbe50b7e18ecbbf431d729e892974984a22a1
Fix for 2977 : exception during the Replication Server database trimming

The database appears to throw deadlock exception during the trimming process.
Since the updates to the replication log are only of two types :
- add of record at the tail of the log
- delete of record at the head of the log
It does not seem possible to have real deadlock, therefore this exception is
probably thrown because the current value of the TXN timeout (500 msec) is
too short.

The fix is therefore simply to Increase this value to 10 seconds.

This should not have any performance impact.
1 files modified
14 ■■■■ changed files
opends/src/server/org/opends/server/replication/server/ReplicationDbEnv.java 14 ●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/replication/server/ReplicationDbEnv.java
@@ -22,7 +22,7 @@
 * CDDL HEADER END
 *
 *
 *      Copyright 2006-2008 Sun Microsystems, Inc.
 *      Copyright 2006-2009 Sun Microsystems, Inc.
 */
package org.opends.server.replication.server;
import org.opends.messages.*;
@@ -89,9 +89,17 @@
    envConfig.setAllowCreate(true);
    envConfig.setTransactional(true);
    envConfig.setConfigParam("je.cleaner.expunge", "true");
    // TODO : the DB cache size should be configurable
    // For now set 5M is OK for being efficient in 64M total for the JVM
    // Tests have shown that since the parsing of the Replication log is always
    // done sequentially, it is not necessary to use a large DB cache.
    // Use 5M so that the replication can be used with 64M total for the JVM.
    envConfig.setConfigParam("je.maxMemory", "5000000");
    // Since records are always added at the end of the Replication log and
    // deleted at the beginning of the Replication log, this should never
    // cause any deadlock. It is therefore safe to increase the TXN timeout
    // to 10 seconds.
    envConfig.setTxnTimeout(10000000);
    dbEnvironment = new Environment(new File(path), envConfig);
    /*