提交 3a77b671 编写于 作者: D Daniel Gustafsson

Allow gpdemo to be created without checksums

Passing -K to demo_cluster.sh will create gpdemo without enabling
data checksums, which otherwise is the default. The reason for why
one would want to disable checksums is to facilitate testing of
upgrades from a non-checksum cluster to one with (and vice versa).
上级 71916050
#!/bin/bash #!/bin/bash
# ======================================================================
# Configuration Variables
# ======================================================================
# Set to zero to force cluster to be created without data checksums
DATACHECKSUMS=1
# ====================================================================== # ======================================================================
# Data Directories # Data Directories
# ====================================================================== # ======================================================================
...@@ -68,9 +75,10 @@ checkDemoConfig(){ ...@@ -68,9 +75,10 @@ checkDemoConfig(){
USAGE(){ USAGE(){
echo "" echo ""
echo " `basename $0` -c -d -u" echo " `basename $0` {-c | -d | -u} <-K>"
echo " -c : check if demo is possible." echo " -c : Check if demo is possible."
echo " -d : Delete the demo." echo " -d : Delete the demo."
echo " -K : Create cluster without data checksums."
echo " -u : Usage, prints this message." echo " -u : Usage, prints this message."
echo "" echo ""
} }
...@@ -118,7 +126,7 @@ cleanDemo(){ ...@@ -118,7 +126,7 @@ cleanDemo(){
# Main Section # Main Section
#***************************************************************************** #*****************************************************************************
while getopts ":cd'?'" opt while getopts ":cdK'?'" opt
do do
case $opt in case $opt in
'?' ) USAGE ;; '?' ) USAGE ;;
...@@ -133,6 +141,9 @@ do ...@@ -133,6 +141,9 @@ do
d) cleanDemo d) cleanDemo
exit 0 exit 0
;; ;;
K) DATACHECKSUMS=0
shift
;;
*) USAGE *) USAGE
exit 0 exit 0
;; ;;
...@@ -278,6 +289,13 @@ cat >> $CLUSTER_CONFIG <<-EOF ...@@ -278,6 +289,13 @@ cat >> $CLUSTER_CONFIG <<-EOF
ENCODING=UNICODE ENCODING=UNICODE
EOF EOF
if [ "${DATACHECKSUMS}" == "0" ]; then
cat >> $CLUSTER_CONFIG <<-EOF
# Turn off data checksums
HEAP_CHECKSUM=off
EOF
fi
if [ "${WITH_MIRRORS}" == "true" ]; then if [ "${WITH_MIRRORS}" == "true" ]; then
cat >> $CLUSTER_CONFIG <<-EOF cat >> $CLUSTER_CONFIG <<-EOF
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册