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
This commit is contained in:
Aaron Gao 2017-04-05 12:10:01 -07:00 committed by Facebook Github Bot
parent e5a1372b24
commit af256eb2b7

View File

@ -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