Schema cache reload with zero downtime (#1559)

* Improve error messages and comments

* Reorder Main.hs functions
This commit is contained in:
Steve Chavez
2020-07-16 13:39:25 -05:00
committed by GitHub
parent 6b2767d35c
commit 189847927e
5 changed files with 143 additions and 146 deletions
+1 -1
View File
@@ -251,11 +251,11 @@ checkDbSchemaReload(){
sleep 0.1 \
|| sleep 1 # fallback: subsecond sleep is not standard and may fail
done
secret="reallyreallyreallyreallyverysafe"
# add v1 schema to db-schema
replaceConfigValue "db-schema" "test, v1" ./configs/sigusr2-settings.config
# reload
kill -s SIGUSR2 $pgrPID
kill -s SIGUSR1 $pgrPID
httpStatus="$(v1SchemaParentsStatus)"
if test "$httpStatus" -eq 200
then