You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by mm...@apache.org on 2018/11/22 16:42:57 UTC

[pulsar] branch master updated: Disable ZK & BK fsync calls in integration tests (#3037)

This is an automated email from the ASF dual-hosted git repository.

mmerli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar.git


The following commit(s) were added to refs/heads/master by this push:
     new 36f7ac3  Disable ZK & BK fsync calls in integration tests (#3037)
36f7ac3 is described below

commit 36f7ac369d9ed6193928a7cad3cd6d762d91d981
Author: Matteo Merli <mm...@apache.org>
AuthorDate: Thu Nov 22 08:42:53 2018 -0800

    Disable ZK & BK fsync calls in integration tests (#3037)
    
    * Disable ZK & BK fsync calls in integration tests
    
    * Added warning in zk conf file
---
 conf/zookeeper.conf                                                 | 6 ++++++
 .../apache/pulsar/tests/integration/topologies/PulsarCluster.java   | 4 ++++
 2 files changed, 10 insertions(+)

diff --git a/conf/zookeeper.conf b/conf/zookeeper.conf
index e67eade..c6069e1 100644
--- a/conf/zookeeper.conf
+++ b/conf/zookeeper.conf
@@ -48,3 +48,9 @@ autopurge.snapRetainCount=3
 # Purge task interval in hours
 # Set to "0" to disable auto purge feature
 autopurge.purgeInterval=1
+
+# Requires updates to be synced to media of the transaction log before finishing
+# processing the update. If this option is set to 'no', ZooKeeper will not require
+# updates to be synced to the media.
+# WARNING: it's not recommended to run a production ZK cluster with forceSync disabled.
+forceSync=yes
diff --git a/tests/integration/src/test/java/org/apache/pulsar/tests/integration/topologies/PulsarCluster.java b/tests/integration/src/test/java/org/apache/pulsar/tests/integration/topologies/PulsarCluster.java
index bbb5bd4..c04b669 100644
--- a/tests/integration/src/test/java/org/apache/pulsar/tests/integration/topologies/PulsarCluster.java
+++ b/tests/integration/src/test/java/org/apache/pulsar/tests/integration/topologies/PulsarCluster.java
@@ -111,6 +111,7 @@ public class PulsarCluster {
             .withEnv("clusterName", clusterName)
             .withEnv("zkServers", ZKContainer.NAME)
             .withEnv("configurationStore", CSContainer.NAME + ":" + CS_PORT)
+            .withEnv("forceSync", "no")
             .withEnv("pulsarNode", "pulsar-broker-0");
 
         this.csContainer = new CSContainer(clusterName)
@@ -136,6 +137,9 @@ public class PulsarCluster {
                         .withNetworkAliases(name)
                         .withEnv("zkServers", ZKContainer.NAME)
                         .withEnv("useHostNameAsBookieID", "true")
+                        // Disable fsyncs for tests since they're slow within the containers
+                        .withEnv("journalSyncData", "false")
+                        .withEnv("journalMaxGroupWaitMSec", "0")
                         .withEnv("clusterName", clusterName)
                 )
         );