diff --git a/.travis.yml b/.travis.yml index 3be91295ba..f49be75d07 100644 --- a/.travis.yml +++ b/.travis.yml @@ -20,7 +20,8 @@ cache: before_install: - wget https://raw.githubusercontent.com/xiaomi/pegasus-common/master/build-depends.tar.gz - - tar xf build-depends.tar.gz + - tar xfz build-depends.tar.gz + - rm -f build-depends.tar.gz - cd packages - ls | xargs sudo dpkg -i --force-depends - cd .. @@ -33,13 +34,16 @@ install: before_script: - cd rdsn/thirdparty - wget https://raw.githubusercontent.com/xiaomi/pegasus-common/master/pegasus-thirdparty-prebuild.tar.gz - - tar xf pegasus-thirdparty-prebuild.tar.gz - - rm -rf pegasus-thirdparty-prebuild.tar.gz + - tar xfz pegasus-thirdparty-prebuild.tar.gz + - rm -f pegasus-thirdparty-prebuild.tar.gz - cd ../.. - ulimit -c unlimited -S script: - - ./run.sh build && ./run.sh test + - ./run.sh build --skip_thirdparty && ./run.sh test + +after_script: + - ./run.sh stop_zk notifications: email: false diff --git a/run.sh b/run.sh index 3839b85552..a74974118f 100755 --- a/run.sh +++ b/run.sh @@ -71,6 +71,7 @@ function usage_build() echo " -v|--verbose build in verbose mode, default no" echo " --disable_gperf build without gperftools, this flag is mainly used" echo " to enable valgrind memcheck, default no" + echo " --skip_thirdparty whether to skip building thirdparties, default no" } function run_build() { @@ -85,6 +86,8 @@ function run_build() WARNING_ALL=NO ENABLE_GCOV=NO RUN_VERBOSE=NO + DISABLE_GPERF=NO + SKIP_THIRDPARTY=NO TEST_MODULE="" while [[ $# > 0 ]]; do key="$1" @@ -136,7 +139,9 @@ function run_build() ;; --disable_gperf) DISABLE_GPERF=YES - shift + ;; + --skip_thirdparty) + SKIP_THIRDPARTY=YES ;; *) echo "ERROR: unknown option \"$key\"" @@ -192,6 +197,9 @@ function run_build() if [ "$DISABLE_GPERF" == "YES" ]; then OPT="$OPT --disable_gperf" fi + if [ "$SKIP_THIRDPARTY" == "YES" ]; then + OPT="$OPT --skip_thirdparty" + fi ./run.sh build $OPT --notest if [ $? -ne 0 ]; then echo "ERROR: build rdsn failed" diff --git a/scripts/clear_zk.sh b/scripts/clear_zk.sh index cbe07f3d82..5d7029479b 100755 --- a/scripts/clear_zk.sh +++ b/scripts/clear_zk.sh @@ -19,4 +19,3 @@ then rm -rf $ZOOKEEPER_HOME/data &>/dev/null echo "Clearing zookeeper ... CLEARED" fi - diff --git a/scripts/start_zk.sh b/scripts/start_zk.sh index 560057f345..fcc5b89eb4 100755 --- a/scripts/start_zk.sh +++ b/scripts/start_zk.sh @@ -30,7 +30,7 @@ if [ ! -f zookeeper-3.4.6.tar.gz ]; then download_url="http://git.n.xiaomi.com/pegasus/packages/raw/master/zookeeper-3.4.6.tar.gz" wget -T 5 -t 1 $download_url if [ $? -ne 0 ]; then - download_url="https://github.com/shengofsun/packages/raw/master/zookeeper-3.4.6.tar.gz" + download_url="https://github.com/xiaomi/pegasus-common/raw/master/zookeeper-3.4.6.tar.gz" wget -T 5 -t 1 $download_url if [ $? -ne 0 ]; then echo "ERROR: download zookeeper failed" @@ -57,7 +57,7 @@ sed -i "s@clientPort=2181@clientPort=$ZOOKEEPER_PORT@" $ZOOKEEPER_HOME/conf/zoo. mkdir -p $ZOOKEEPER_HOME/data $ZOOKEEPER_HOME/bin/zkServer.sh start -sleep 0.1 +sleep 1 if echo ruok | nc localhost $ZOOKEEPER_PORT | grep -q imok; then echo "Zookeeper started at port $ZOOKEEPER_PORT" @@ -66,4 +66,3 @@ else echo "ERROR: start zookeeper failed" exit 1 fi - diff --git a/scripts/stop_zk.sh b/scripts/stop_zk.sh index bf6ea49920..36729ebb51 100755 --- a/scripts/stop_zk.sh +++ b/scripts/stop_zk.sh @@ -17,4 +17,3 @@ if [ -d "$ZOOKEEPER_HOME" ] then $ZOOKEEPER_HOME/bin/zkServer.sh stop fi - diff --git a/src/server/config.ini b/src/server/config.ini index 179a661b17..b3dcb6f877 100644 --- a/src/server/config.ini +++ b/src/server/config.ini @@ -267,7 +267,7 @@ rocksdb_level0_slowdown_writes_trigger = 30 rocksdb_level0_stop_writes_trigger = 60 rocksdb_disable_table_block_cache = false - rocksdb_compression_type = snappy + rocksdb_compression_type = lz4 checkpoint_reserve_min_count = 3 checkpoint_reserve_time_seconds = 3600