From 4a371f6717c50f5e327efeeaeeeccd3f82e1f5b0 Mon Sep 17 00:00:00 2001
From: Fabio Pistolesi <fabio.pistolesi@forgerock.com>
Date: Thu, 10 Dec 2015 10:38:32 +0000
Subject: [PATCH] Partial fix for OPENDJ-2190 Delete not replicated after 36h of add/delete operations on replicated topology

---
 opendj-server-legacy/src/main/java/org/opends/server/api/WorkQueue.java |   11 ++++-------
 1 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/opendj-server-legacy/src/main/java/org/opends/server/api/WorkQueue.java b/opendj-server-legacy/src/main/java/org/opends/server/api/WorkQueue.java
index a1815a4..d6800f5 100644
--- a/opendj-server-legacy/src/main/java/org/opends/server/api/WorkQueue.java
+++ b/opendj-server-legacy/src/main/java/org/opends/server/api/WorkQueue.java
@@ -22,11 +22,12 @@
  *
  *
  *      Copyright 2006-2010 Sun Microsystems, Inc.
- *      Portions Copyright 2013-2014 ForgeRock AS.
+ *      Portions Copyright 2013-2015 ForgeRock AS.
  */
 package org.opends.server.api;
 
 import static org.opends.messages.CoreMessages.*;
+
 import org.forgerock.i18n.slf4j.LocalizedLogger;
 import org.forgerock.i18n.LocalizableMessage;
 import org.opends.server.admin.std.server.WorkQueueCfg;
@@ -34,8 +35,7 @@
 import org.opends.server.types.DirectoryException;
 import org.opends.server.types.InitializationException;
 import org.opends.server.types.Operation;
-
-
+import org.opends.server.util.Platform;
 
 /**
  * This class defines the structure and methods that must be
@@ -166,11 +166,8 @@
     else
     {
       // Automatically choose based on the number of processors.
-      int cpus = Runtime.getRuntime().availableProcessors();
-      int value = Math.max(24, cpus * 2);
-
+      int value = Platform.computeNumberOfThreads(16, 2);
       logger.debug(INFO_ERGONOMIC_SIZING_OF_WORKER_THREAD_POOL, value);
-
       return value;
     }
   }

--
Gitblit v1.10.0