[
https://issues.apache.org/jira/browse/QPID-8547?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17380885#comment-17380885
]
ASF GitHub Bot commented on QPID-8547:
--------------------------------------
alex-rufous commented on a change in pull request #101:
URL: https://github.com/apache/qpid-broker-j/pull/101#discussion_r670008237
##########
File path:
bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/replication/ReplicatedEnvironmentFacade.java
##########
@@ -20,41 +20,53 @@
*/
package org.apache.qpid.server.store.berkeleydb.replication;
-import java.io.ByteArrayOutputStream;
Review comment:
the order of imports is not complaint with Qpid code style
##########
File path:
bdbstore/src/main/java/org/apache/qpid/server/virtualhost/berkeleydb/BDBVirtualHost.java
##########
@@ -37,11 +37,21 @@
long BDB_MIN_CACHE_SIZE = 10*1024*1024;
String QPID_BROKER_BDB_TOTAL_CACHE_SIZE = "qpid.broker.bdbTotalCacheSize";
+ String QPID_BROKER_BDB_COMMITER_NOTIFY_THRESHOLD =
"qpid.broker.bdbCommiterNotifyThreshold";
+ String QPID_BROKER_BDB_COMMITER_NOTIFY_TIMEOUT =
"qpid.broker.bdbCommiterNotifyTimeout";
Review comment:
Please rename it into `qpid.broker.bdbCommiterWaitTimeout`
##########
File path:
bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/StandardEnvironmentFacade.java
##########
@@ -46,13 +35,23 @@
import com.sleepycat.je.Transaction;
import com.sleepycat.je.TransactionConfig;
import org.apache.qpid.server.model.ConfiguredObject;
+import org.apache.qpid.server.store.StoreException;
+import org.apache.qpid.server.store.berkeleydb.logging.Slf4jLoggingHandler;
import org.apache.qpid.server.store.berkeleydb.upgrade.Upgrader;
-
+import org.apache.qpid.server.virtualhost.berkeleydb.BDBVirtualHost;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import org.apache.qpid.server.store.StoreException;
-import org.apache.qpid.server.store.berkeleydb.logging.Slf4jLoggingHandler;
+import java.io.File;
Review comment:
the order of imports does not confirm to Qpid code style. Please
re-arrange as per Qpid code style requirements
##########
File path:
bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/CoalescingCommiter.java
##########
@@ -134,18 +134,21 @@ public void abort(RuntimeException databaseException)
private static class CommitThread extends Thread
{
private static final Logger LOGGER =
LoggerFactory.getLogger(CommitThread.class);
- private static final int JOB_QUEUE_NOTIFY_THRESHOLD = 8;
+ private final int jobQueueNotifyThreshold;
Review comment:
the fields should start with underscore as per Qpid code style
##########
File path:
bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/CoalescingCommiter.java
##########
@@ -134,18 +134,21 @@ public void abort(RuntimeException databaseException)
private static class CommitThread extends Thread
{
private static final Logger LOGGER =
LoggerFactory.getLogger(CommitThread.class);
- private static final int JOB_QUEUE_NOTIFY_THRESHOLD = 8;
+ private final int jobQueueNotifyThreshold;
+ private final long commiterNotifyTimeout;
private final AtomicBoolean _stopped = new AtomicBoolean(false);
private final Queue<CommitThreadJob> _jobQueue = new
ConcurrentLinkedQueue<>();
private final Object _lock = new Object();
private final EnvironmentFacade _environmentFacade;
private final List<CommitThreadJob> _inProcessJobs = new
ArrayList<>(256);
- public CommitThread(String name, EnvironmentFacade environmentFacade)
+ public CommitThread(String name, int commiterNotifyThreshold, long
commiterNotifyTimeout, EnvironmentFacade environmentFacade)
Review comment:
I think that a better name for `commiterNotifyTimeout` could be
`commiterWaitTimeout` as it would convey the purpose of timeout more accurately
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
> [Broker-J] Configurable parameters for CoalescingCommiter
> ----------------------------------------------------------
>
> Key: QPID-8547
> URL: https://issues.apache.org/jira/browse/QPID-8547
> Project: Qpid
> Issue Type: Improvement
> Components: Broker-J
> Affects Versions: qpid-java-broker-8.0.5
> Reporter: Daniil Kirilyuk
> Priority: Minor
>
> CoalescingCommiter runs in a separate thread containing a job queue to which
> new transaction jobs are added. Once amount of jobs overflows a threshold
> (hardcoded value 8) or times out (500 ms hardcoded), changes are flushed to
> the disk.
> Those parameters should be configurable to make BDB behavior more flexible.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]