You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by or...@apache.org on 2019/05/06 21:50:13 UTC
[qpid-broker-j] branch 7.1.x updated: QPID-8304: [Broker-J][JDBC
Message Store] Performance bottleneck at the level of the executor
This is an automated email from the ASF dual-hosted git repository.
orudyy pushed a commit to branch 7.1.x
in repository https://gitbox.apache.org/repos/asf/qpid-broker-j.git
The following commit(s) were added to refs/heads/7.1.x by this push:
new b2f3444 QPID-8304: [Broker-J][JDBC Message Store] Performance bottleneck at the level of the executor
b2f3444 is described below
commit b2f34440a43f7bef3fe4c95c1db71bccb2ab4dc3
Author: overmeulen <ov...@murex.com>
AuthorDate: Tue Apr 30 08:58:29 2019 +0200
QPID-8304: [Broker-J][JDBC Message Store] Performance bottleneck at the level of the executor
This closes #29
(cherry picked from commit d36d30951129fde2f56d3f2e80a436d6ffb93d7e)
---
.../apache/qpid/server/store/jdbc/AbstractJDBCMessageStore.java | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/broker-plugins/jdbc-store/src/main/java/org/apache/qpid/server/store/jdbc/AbstractJDBCMessageStore.java b/broker-plugins/jdbc-store/src/main/java/org/apache/qpid/server/store/jdbc/AbstractJDBCMessageStore.java
index bae485e..de8fef2 100644
--- a/broker-plugins/jdbc-store/src/main/java/org/apache/qpid/server/store/jdbc/AbstractJDBCMessageStore.java
+++ b/broker-plugins/jdbc-store/src/main/java/org/apache/qpid/server/store/jdbc/AbstractJDBCMessageStore.java
@@ -86,6 +86,9 @@ public abstract class AbstractJDBCMessageStore implements MessageStore
private static final int IN_CLAUSE_MAX_SIZE_DEFAULT = 1000;
static final String IN_CLAUSE_MAX_SIZE = "qpid.jdbcstore.inClauseMaxSize";
+ private static final int EXECUTOR_THREADS_DEFAULT = Runtime.getRuntime().availableProcessors();
+ private static final String EXECUTOR_THREADS = "qpid.jdbcstore.executorThreads";
+
private static final int DB_VERSION = 8;
private final AtomicLong _messageId = new AtomicLong(0);
@@ -219,7 +222,10 @@ public abstract class AbstractJDBCMessageStore implements MessageStore
protected void initMessageStore(final ConfiguredObject<?> parent)
{
_parent = parent;
- _executor = new ScheduledThreadPoolExecutor(4, new ThreadFactory()
+
+ int corePoolSize = getContextValue(Integer.class, EXECUTOR_THREADS, EXECUTOR_THREADS_DEFAULT);
+
+ _executor = new ScheduledThreadPoolExecutor(corePoolSize, new ThreadFactory()
{
private final AtomicInteger _count = new AtomicInteger();
@Override
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org