Skip to content

Commit

Permalink
Fix lostwrite testcase
Browse files Browse the repository at this point in the history
Signed-off-by: Mark Hannum <mhannum72@gmail.com>
  • Loading branch information
markhannum committed Jan 9, 2025
1 parent 1bd4240 commit fbe5933
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
2 changes: 1 addition & 1 deletion tests/lostwrite.test/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ endif

export CHECK_DB_AT_FINISH=0
ifeq ($(TEST_TIMEOUT),)
export TEST_TIMEOUT=23m
export TEST_TIMEOUT=30m
endif
2 changes: 1 addition & 1 deletion tests/lostwrite.test/lrl.options
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
all_incoherent on
decoupled_logputs off
setattr REP_PROCESSORS 0
setattr REP_WORKERS 0
replicant_retry_on_not_durable on
forbid_remote_admin 0
17 changes: 15 additions & 2 deletions tests/lostwrite.test/runit
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ function inserter
let count=count+1
fi
done
sleep 5
checkdata $1
}

Expand All @@ -79,19 +80,28 @@ function bouncemaster
$ssh $node ${DEBUG_PREFIX} ${CMD} >> $TESTDIR/logs/${DBNAME}.${node}.db 2>&1 &
}

function unsettunables
{
sleep 5
for node in $CLUSTER ; do
$CDB2SQL_EXE --admin $DBNAME --host $node 'PUT TUNABLE replicant_latency 0' &
$CDB2SQL_EXE --admin $DBNAME --host $node 'PUT TUNABLE all_incoherent 0' &
done
}

function settunables
{
sleep 5
for node in $CLUSTER ; do
$ssh $node "$CDB2SQL_EXE --admin $DBNAME --host $node 'PUT TUNABLE replicant_latency 1'" &
$CDB2SQL_EXE --admin $DBNAME --host $node 'PUT TUNABLE replicant_latency 1' &
$CDB2SQL_EXE --admin $DBNAME --host $node 'PUT TUNABLE all_incoherent 1' &
done
}

function setup
{
$CDB2SQL_EXE $CDB2_OPTIONS $DBNAME default "DROP TABLE IF EXISTS t1"
$CDB2SQL_EXE $CDB2_OPTIONS $DBNAME default "CREATE TABLE t1(t int,a int)"
#sleep 7
$CDB2SQL_EXE $CDB2_OPTIONS $DBNAME default "CREATE INDEX ix1 ON t1(t,a)"
}

Expand Down Expand Up @@ -141,6 +151,9 @@ function run_test
echo "BOUNCE COUNT $i"
bouncemaster
done
unsettunables
unsettunables
unsettunables
touch $stopfile
waitforinserters $threads
if [[ "$keepalive" != "1" ]] ; then
Expand Down

0 comments on commit fbe5933

Please sign in to comment.