Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New r124/ydb312_gtm8182g subtest (tests YottaDB/YottaDB#312 in r1.24) #341

Merged
merged 5 commits into from
Jul 30, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix comments for clarity. Remove unecessary variables and commented code
  • Loading branch information
JakeYottaDB committed Jul 30, 2018
commit 960f8f4117311f044d75a0a82369ccde0359c780
3 changes: 1 addition & 2 deletions r124/inref/ydb312gtm8182g.m
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
quit

numProc
WRITE " Attached processes: "
WRITE " Number of processes attached to journal pool of mumps.repl: "

ZSYSTEM "$ydb_dist/mupip ftok -jnlpool mumps.repl |& $grep mumps.repl | $tst_awk '{print $6}' >& shm1.out ; ipcs -a | $grep `cat ./shm1.out` | $tst_awk '{print $NF}'"

Expand All @@ -61,4 +61,3 @@

ZSYSTEM "set repl_ftok_semid = `$gtm_dist/ftok -id=44 $gtm_repl_instance | awk '{print $5}'` ; $gtm_dist/semstat2 `ipcs -s | grep $repl_ftok_semid | awk '{print $2}'` | grep 'sem 1' | sed 's/sem 1/JNLPOOL ftok : '$gtm_repl_instance' /g' "

quit
31 changes: 12 additions & 19 deletions r124/outref/ydb312_gtm8182g.txt
Original file line number Diff line number Diff line change
@@ -1,43 +1,36 @@
Create the DB
# Create the DB


%GDE-I-GDUSEDEFS, Using defaults for Global Directory
##TEST_PATH##/GBL1.gld
%GDE-I-VERIFY, Verification OK
# GBL1.gld is created to point to mumps.dat and mumps.repl

%GDE-I-GDCREATE, Creating Global Directory file
##TEST_PATH##/GBL1.gld
%GDE-I-GDUSEDEFS, Using defaults for Global Directory
##TEST_PATH##/GBL2.gld
%GDE-I-VERIFY, Verification OK
# GBL2.gld is created to point to a.dat and mumps.repl

%GDE-I-GDCREATE, Creating Global Directory file
##TEST_PATH##/GBL2.gld
# Start INST1 INST2 replication
# Change back to original global directory

# Start INST1 INST2 replication with mumps.gld as $zgbldir
==Executing MULTISITE_REPLIC 'START INST1 INST2'==
Starting Primary Source Server in ##TEST_PATH##
Starting Passive Source Server and Receiver Server in ##FILTERED##_REMOTE_TEST_PATH_/instance2

# Run ydb312gtm8182g.m to update DB through GBL1 and GBL2
# Run ydb312gtm8182g.m to update DB through GBL1.gld and GBL2.gld

Before updates:
----------------:
Attached processes: 1
##TEST_AWKJNLPOOL ftok : mumps.repl : \(semval=1, semncnt=0, semzcnt=0, sempid=[0-9]*\)
Number of processes attached to journal pool of mumps.repl: 1
##TEST_AWK JNLPOOL ftok : mumps.repl : \(semval=1, semncnt=0, semzcnt=0, sempid=[0-9]*\)

Updating through GBL1.gld
Updating through GBL2.gld

After updates:
----------------:
Attached processes: 2
##TEST_AWKJNLPOOL ftok : mumps.repl : \(semval=2, semncnt=0, semzcnt=0, sempid=[0-9]*\)
Number of processes attached to journal pool of mumps.repl: 2
##TEST_AWK JNLPOOL ftok : mumps.repl : \(semval=2, semncnt=0, semzcnt=0, sempid=[0-9]*\)


# Write variables to the screen from mumps.gld
# ^Protagonist: Hamilton
# ^Antagonist : Burr

Check and shutdown the DB
----------------------------------------------------------------------------
# Check and shutdown the DB
DB has shutdown gracefully
58 changes: 16 additions & 42 deletions r124/u_inref/ydb312_gtm8182g.csh
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,11 @@
#################################################################
#
setenv gtm_repl_instance "mumps.repl"
unsetenv gtm_db_counter_sem_incr # avoid semaphore counter overflow

#setenv ydb_gbldir "GBL3"
#setenv gtmgbldir $ydb_gbldir
#DB3 will be the main DB with its global dir containing DB1 and DB2
unsetenv gtm_db_counter_sem_incr # avoid semaphore counter overflow otherwise they inflate semval which affects the reference file

$MULTISITE_REPLIC_PREPARE 2

echo "Create the DB"
# create a 2 region DB with mumps.dat tied to DEFAULT and a.dat tied to AREG
echo "# Create the DB"
$gtm_tst/com/dbcreate.csh mumps 2 -gld_has_db_fullpath >>& dbcreate.out
if ($status) then
echo "DB Create Failed, Output Below"
Expand All @@ -31,49 +26,30 @@ endif
echo ""
echo ""

#C[HANGE] -R[EGION] region-name [-REGION-qualifier...]

#Create the global directory for DB1 and point its GLD towards DB3's mumps.dat DB file
# add -segment cusseg -file=cus.dat
# C[HANGE] -S[EGMENT] segment-name [-SEGMENT-qualifier...]

setenv ydb_gbldir "GBL1"
setenv gtmgbldir $ydb_gbldir
setenv GBL1 "GBL1.gld"
$GDE CHANGE -SEGMENT DEFAULT -FILE=mumps.dat
#A[DD] -S[EGMENT] segment-name [-SEGMENT-qualifier...] -F[ILE_NAME]=file-name
echo "# GBL1.gld is created to point to mumps.dat and mumps.repl"
setenv gtmgbldir "GBL1"
$GDE CHANGE -SEGMENT DEFAULT -FILE=mumps.dat >& gde_change1.txt
echo ""

#Create the global directory for DB2 and point its GLD towards DB3's a.dat DB file
setenv ydb_gbldir "GBL2"
setenv gtmgbldir $ydb_gbldir
setenv GBL2 "GBL2.gld"
$GDE CHANGE -SEGMENT DEFAULT -FILE=a.dat
echo "# GBL2.gld is created to point to a.dat and mumps.repl"
setenv gtmgbldir "GBL2"
$GDE CHANGE -SEGMENT DEFAULT -FILE=a.dat >& gde_change2.txt
echo ""

#Change back to original global directory
#setenv ydb_gbldir "GBL3"
setenv ydb_gbldir "mumps"
setenv gtmgbldir $ydb_gbldir
echo "# Change back to original global directory"
setenv gtmgbldir "mumps"
echo ""

echo "# Start INST1 INST2 replication"
echo '# Start INST1 INST2 replication with mumps.gld as $zgbldir'
$MSR START INST1 INST2
echo ""

setenv path_INST1 `$tst_awk '{-F " "; if ($1" "$2 ~ /INST1 DBDIR/) print $3}' $tst_working_dir/msr_instance_config.txt`

#echo "# Attached processes before updates"
#$ydb_dist/mupip ftok -jnlpool mumps.repl |& $grep mumps.repl | $tst_awk '{print $6}' >& shm1.out
#ipcs -a | $grep `cat ./shm1.out` | $tst_awk '{print $NF}'
#echo ""

echo "# Run ydb312gtm8182g.m to update DB through GBL1 and GBL2"
echo "# Run ydb312gtm8182g.m to update DB through GBL1.gld and GBL2.gld"
$gtm_dist/mumps -run ydb312gtm8182g
echo ""

#echo "# Attached processes after updates"
#$ydb_dist/mupip ftok -jnlpool mumps.repl |& $grep mumps.repl | $tst_awk '{print $6}' >& shm2.out
#ipcs -a | $grep `cat ./shm2.out` | $tst_awk '{print $NF}'
#echo ""

echo "# Write variables to the screen from mumps.gld"
echo -n "# ^Protagonist: "
$ydb_dist/mumps -run ^%XCMD 'WRITE ^Protagonist,!'
Expand All @@ -82,9 +58,7 @@ $ydb_dist/mumps -run ^%XCMD 'WRITE ^Antagonist,!'
echo ""



echo "Check and shutdown the DB"
echo "----------------------------------------------------------------------------"
echo "# Check and shutdown the DB"
$gtm_tst/com/dbcheck.csh >>& check.out
if ($status) then
echo "DB Check Failed, Output Below"
Expand Down