From 4de0af4fa5ef720fdd08821ff31e7604202e18e4 Mon Sep 17 00:00:00 2001 From: Mechiel Lukkien Date: Thu, 21 Sep 2023 16:09:40 +0200 Subject: [PATCH] add another automated upgrade test for the path from v0.0.5 with lots of messages straight to the latest development version. this can do multiple database changes in one go, so it's a bit different than for installs where an admin has upgraded each version when it was released. --- test-upgrade.sh | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/test-upgrade.sh b/test-upgrade.sh index 6b81bca..ca68b8b 100755 --- a/test-upgrade.sh +++ b/test-upgrade.sh @@ -50,6 +50,21 @@ for tag in $tagsrev; do rm -r $tag/data done +# Do upgrade from v0.0.5 with big import straight to current. Will create +# multiple new indices so may be heavier during upgrade. +echo "Testing upgrade from v0.0.5 + big import straight to current." +tag=v0.0.5 +./$tag/mox gentestdata stepdata +ulimit -S -d unlimited +echo 'Importing bulk data for upgrading.' +gunzip < ../upgradetest.mbox.gz | time ./$tag/mox ximport mbox ./stepdata/accounts/test0 upgradetest /dev/stdin +echo +ulimit -S -d 768000 +time ../../mox -cpuprof ../../upgrade0-verifydata.cpu.pprof -memprof ../../upgrade0-verifydata.mem.pprof verifydata -skip-size-check stepdata +time ../../mox -loglevel info -cpuprof ../../upgrade0-openaccounts.cpu.pprof -memprof ../../upgrade0-openaccounts.mem.pprof openaccounts stepdata test0 test1 test2 +rm -r stepdata + + # Also go step-wise through each released version. Having upgraded step by step # can have added more schema upgrades to the database files. tags=$(git tag --sort creatordate | grep -v '^v0\.0\.[123]$' | cat) @@ -81,8 +96,8 @@ for tag in $tags; do fi done echo "Testing final upgrade to current." -time ../../mox -cpuprof ../../upgrade-verifydata.cpu.pprof -memprof ../../upgrade-verifydata.mem.pprof verifydata -skip-size-check stepdata -time ../../mox -loglevel info -cpuprof ../../upgrade-openaccounts.cpu.pprof -memprof ../../upgrade-openaccounts.mem.pprof openaccounts stepdata test0 test1 test2 +time ../../mox -cpuprof ../../upgrade1-verifydata.cpu.pprof -memprof ../../upgrade1-verifydata.mem.pprof verifydata -skip-size-check stepdata +time ../../mox -loglevel info -cpuprof ../../upgrade1-openaccounts.cpu.pprof -memprof ../../upgrade1-openaccounts.mem.pprof openaccounts stepdata test0 test1 test2 rm -r stepdata rm */mox cd ../..