From af256eb2b7f077500a84061d1c62422c7b88c17e Mon Sep 17 00:00:00 2001 From: Aaron Gao Date: Wed, 5 Apr 2017 12:10:01 -0700 Subject: [PATCH] build db every monday Summary: Rebuilding regression db at the first run every monday. Closes https://github.com/facebook/rocksdb/pull/2093 Differential Revision: D4836961 Pulled By: lightmark fbshipit-source-id: 22d6c25 --- tools/regression_test.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/regression_test.sh b/tools/regression_test.sh index 12c7c79e9..412656094 100755 --- a/tools/regression_test.sh +++ b/tools/regression_test.sh @@ -127,7 +127,8 @@ function main { tmp=$DB_PATH DB_PATH=$ORIGIN_PATH test_remote "test -d $DB_PATH" - if [[ $? -ne 0 ]] || [[ $(run_remote 'echo $(( $(date +"%s") - $(stat -c "%Y" '"$DB_PATH"') ))') -gt "604800" ]]; then + if [[ $? -ne 0 ]] || [[ $(run_remote 'date +%u') -eq 7 && + $(run_remote 'echo $(( $(date +"%s") - $(stat -c "%Y" '"$DB_PATH"') ))') -gt "86400" ]]; then run_remote "rm -rf $DB_PATH" echo "Building DB..." run_db_bench "fillseqdeterministic" $NUM_KEYS 1 0