Tue Jun 17 10:48:17 PDT 2008
- Previous message: [Slony1-commit] slony1-engine/tests/testmergeset gen_ddl_slonik.sh
- Next message: [Slony1-commit] slony1-engine/src/slon remote_worker.c
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Update of /home/cvsd/slony1/slony1-engine/src/ducttape In directory main.slony.info:/tmp/cvs-serv1488/ducttape Modified Files: test_2_pgbench.in Log Message: Changed ducttape test 2 to use "wait for event" after subscriptions in order to subscribe node 3 as soon as possible, which is when node 2 has finished the copy set operation and has done it's very first sync processing. This revealed a problem in the remote worker. Messages that forward confirmations need to be inserted at the head of the internal message queue in order to get processed in case the node is waiting for the data provider to catch up before starting to copy set in a cascaded setup. Jan Index: test_2_pgbench.in =================================================================== RCS file: /home/cvsd/slony1/slony1-engine/src/ducttape/test_2_pgbench.in,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** test_2_pgbench.in 28 May 2008 19:46:46 -0000 1.7 --- test_2_pgbench.in 17 Jun 2008 17:48:15 -0000 1.8 *************** *** 33,38 **** DEBUG_LEVEL=2 ! PGBENCH_SCALE=1 ! PGBENCH_CLIENTS=5 PGBENCH_TRANS=`expr 50000 / $PGBENCH_CLIENTS` --- 33,38 ---- DEBUG_LEVEL=2 ! PGBENCH_SCALE=3 ! PGBENCH_CLIENTS=6 PGBENCH_TRANS=`expr 50000 / $PGBENCH_CLIENTS` *************** *** 270,288 **** subscribe set ( id = 1, provider = 1, receiver = 2, forward = yes ); - _EOF_ ! echo "" ! echo "**********************************************************************" ! echo "**** $DB2 should now be copying data and attempting to catch up." ! echo "**********************************************************************" ! echo "" - ###################################################################### - # Setup DB2 as a subscriber node and let it subscribe the replication - # set of the running pgbench - ###################################################################### - # echo -n "**** Hit enter when node 2 is done with copy set" - # read line - sleep `expr 60 \* $PGBENCH_SCALE` echo "**** creating database for Node 3" if ! createdb $DB3 ; then --- 270,282 ---- subscribe set ( id = 1, provider = 1, receiver = 2, forward = yes ); ! echo '**** Waiting for SUBSCRIBE_SET to reach Origin'; ! wait for event (origin = 1, confirmed = 1, wait on = 1, timeout = 0); ! echo '**** Waiting for node 2 to process ENABLE_SUBSCRIPTION'; ! sync (id = 1); ! wait for event (origin = 1, confirmed = 2, wait on = 2, timeout = 0); ! echo '**** Subscription of node 2 complete'; ! _EOF_ echo "**** creating database for Node 3" if ! createdb $DB3 ; then *************** *** 345,358 **** subscribe set ( id = 1, provider = 2, receiver = 3, forward = no ); _EOF_ echo "" echo "**********************************************************************" ! echo "**** $DB3 should now be copying data and attempting to catch up." echo "**********************************************************************" echo "" - - echo -n "**** waiting for pgbench to finish " while kill -0 $pgbench_pid 2>/dev/null ; do --- 339,357 ---- subscribe set ( id = 1, provider = 2, receiver = 3, forward = no ); + + echo '**** Waiting for SUBSCRIBE_SET to reach Origin'; + wait for event (origin = 2, confirmed = 1, wait on = 1, timeout = 0); + echo '**** Waiting for node 3 to process ENABLE_SUBSCRIPTION'; + sync (id = 1); + wait for event (origin = 1, confirmed = 3, wait on = 3, timeout = 0); + echo '**** Subscription of node 3 complete'; _EOF_ echo "" echo "**********************************************************************" ! echo "**** $DB3 should now be catching up." echo "**********************************************************************" echo "" echo -n "**** waiting for pgbench to finish " while kill -0 $pgbench_pid 2>/dev/null ; do *************** *** 361,373 **** done echo "**** pgbench finished" - echo "**** please terminate the replication engines when caught up." - wait $slon1_pid - wait $slon2_pid - wait $slon3_pid ! kill $pgbench_pid 2>/dev/null ! kill $slon1_pid 2>/dev/null ! kill $slon2_pid 2>/dev/null ! kill $slon3_pid 2>/dev/null ./compare_pgbench_dumps $DB1 $DB2 --- 360,381 ---- done echo "**** pgbench finished" ! ###################################################################### ! # Wait for nodes 2 and 3 to catch up. ! ###################################################################### ! sleep 10 ! slonik <<_EOF_ ! cluster name = T1; ! node 1 admin conninfo = 'dbname=$DB1'; ! node 2 admin conninfo = 'dbname=$DB2'; ! node 3 admin conninfo = 'dbname=$DB3'; ! ! echo '**** Waiting for nodes 2 and 3 to catch up'; ! sync (id = 1); ! wait for event (origin = 1, confirmed = all, wait on = 1, timeout = 0); ! echo '**** All nodes done catching up'; ! _EOF_ ! ! echo "You may terminate the replication engines now." ./compare_pgbench_dumps $DB1 $DB2
- Previous message: [Slony1-commit] slony1-engine/tests/testmergeset gen_ddl_slonik.sh
- Next message: [Slony1-commit] slony1-engine/src/slon remote_worker.c
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Slony1-commit mailing list