2011-09-13 17:48:33 +00:00
|
|
|
# See the file LICENSE for redistribution information.
|
|
|
|
#
|
2012-11-14 20:13:24 +00:00
|
|
|
# Copyright (c) 2010, 2012 Oracle and/or its affiliates. All rights reserved.
|
2011-09-13 17:48:33 +00:00
|
|
|
#
|
|
|
|
# $Id$
|
|
|
|
|
|
|
|
source ./include.tcl
|
|
|
|
source $test_path/test.tcl
|
|
|
|
source $test_path/testutils.tcl
|
|
|
|
source $test_path/reputils.tcl
|
|
|
|
|
|
|
|
set dirC [lindex $argv 0]
|
|
|
|
set portC [lindex $argv 1]
|
|
|
|
set rv [lindex $argv 2]
|
|
|
|
|
|
|
|
proc in_sync_state { d } {
|
|
|
|
global util_path
|
|
|
|
set stat [exec $util_path/db_stat -N -r -R A -h $d]
|
|
|
|
puts "stat is $stat"
|
|
|
|
set in_page [is_substr $stat "SYNC_PAGE"]
|
|
|
|
puts "value is $in_page"
|
|
|
|
return $in_page
|
|
|
|
}
|
|
|
|
|
|
|
|
puts "Start site C"
|
|
|
|
set envC [berkdb env -create -errpfx C -home $dirC -txn -rep -thread \
|
|
|
|
-recover -verbose [list rep $rv]]
|
2012-11-14 20:13:24 +00:00
|
|
|
$envC repmgr -local [list 127.0.0.1 $portC] -start elect
|
2011-09-13 17:48:33 +00:00
|
|
|
|
|
|
|
puts "Wait until it gets into SYNC_PAGES state"
|
|
|
|
while {![in_sync_state $dirC]} {
|
|
|
|
tclsleep 1
|
|
|
|
}
|