Skip to content

Commit

Permalink
[#209] Temporary relinkctl files created by YottaDB have ydb-relinkct…
Browse files Browse the repository at this point in the history
…l prefix (not gtm-relinkctl); Rename fis-gtm references help files to yottadb
  • Loading branch information
nars1 committed May 2, 2018
1 parent 8f2bf31 commit f1e4994
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 35 deletions.
4 changes: 2 additions & 2 deletions sr_port/dse.hlp
Original file line number Diff line number Diff line change
Expand Up @@ -1558,9 +1558,9 @@

This command displays an output like the following:

File /home/jdoe/.fis-gtm/V6.1-000_x86_64/g/gtm.dat
File /home/jdoe/.yottadb/r1.20_x86_64/g/yottadb.dat
Region DEFAULT
File /home/jdoe/.fis-gtm/V6.1-000_x86_64/g/gtm.dat
File /home/jdoe/.yottadb/r1.20_x86_64/g/yottadb.dat
Region DEFAULT
Date/Time 27-JAN-2014 03:13:40 [$H = 63214,11620]
Access method MM Global Buffers 1024
Expand Down
44 changes: 22 additions & 22 deletions sr_port/mumps.hlp
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,7 @@

Example:

$ /usr/lib/fis-gtm/V5.4-002B_x86/gtm -run ^killalias
$ /usr/local/lib/yottadb/r122/ydb -run ^killalias
killalias ; Demonstrate Kill * of pass-by-reference
ZPrint ; Print this program
Set A=1,C=3
Expand Down Expand Up @@ -592,7 +592,7 @@

Example:

$ /usr/lib/fis-gtm/V5.4-002B/gtm -run ^tprestart
$ /usr/local/lib/yottadb/r122/ydb -run ^tprestart
tprestart ; Transaction restart variable association also restored on restart
zprint ; Print this program
set A="Malvern",C="Pennsylvania",E="USA"
Expand Down Expand Up @@ -647,7 +647,7 @@

Note that TROLLBACK does not restore alias variables:

/usr/lib/fis-gtm/V5.4-002B_x86/gtm -run ^tprollback
/usr/local/lib/yottadb/r122/ydb -run ^tprollback
tprollback ;
zprint ; Print this program
set A(1)=1,A(2)=2,A(3)=3
Expand Down Expand Up @@ -709,7 +709,7 @@

Example:

$ /usr/lib/fis-gtm/V5.4-002B_x86/gtm -run ^aliasexample; Extended annotated alias example
$ /usr/local/lib/yottadb/r122/ydb -run ^aliasexample; Extended annotated alias example
zprint
write "------------",!
set x="name level",x(1)=1,x(1,2)="1,2",x("foo")="bar"
Expand Down Expand Up @@ -1868,7 +1868,7 @@
Example:

YDB>write $zgbldir
/usr/lib/fis-gtm/V5.4-002B_x86/mumps.gld
/usr/local/lib/yottadb/r122/mumps.gld
YDB>set $zgbldir="test.gld"
YDB>set a=10
YDB>set b=a
Expand Down Expand Up @@ -4485,7 +4485,7 @@

Example:

/usr/lib/fis-gtm/V5.4-002B_x86/gtm -run ^stackalias
/usr/local/lib/yottadb/r122/ydb -run ^stackalias
stackalias ; Demonstrate New with alias
ZPrint ; Print this program
Set A=1,*B=A,*C(2)=A ; Create some aliases
Expand Down Expand Up @@ -4530,7 +4530,7 @@
The following is essentially the same as the prior example but using an
exclusive NEW:

$ /usr/lib/fis-gtm/V5.4-002B_x86/gtm -run ^stackalias1
$ /usr/local/lib/yottadb/r122/ydb -run ^stackalias1
stackalias1 ; Demonstrate New with alias
ZPrint ; Print this program
Set A=1,*B=A,*C(2)=A ; Create some aliases
Expand Down Expand Up @@ -5836,7 +5836,7 @@
YDB>ZLink "NOSENSE"
%YDB-E-LABELMISSING Label referenced but
not defined:lab
%YDB-I-SRCNAM in source module /home/gtmuser1/.fis-gtm/V5.4-002B_x86/r/
%YDB-I-SRCNAM in source module /home/gtmuser1/.yottadb/r122_x86_64/r/
NOSENSE.m
YDB>ZPrint ^NOSENSE
NOSENSE;
Expand Down Expand Up @@ -6402,9 +6402,9 @@
searching through $ZROUTINES, YottaDB creates a small control file
(Relinkctl) in the directory identified by $ydb_linktmpdir (defaulting to
$ydb_tmp, which in turn defaults to /tmp, if unspecified). The names of
these files are of the form gtm-relinkctl-<murmur> where <murmur> is a
these files are of the form ydb-relinkctl-<murmur> where <murmur> is a
hash of the realpath() to an auto-relink directory; for example:
/tmp/gtm-relinkctl-f0938d18ab001a7ef09c2bfba946f002). With each Relinkctl
/tmp/ydb-relinkctl-f0938d18ab001a7ef09c2bfba946f002). With each Relinkctl
file, YottaDB creates and associates a block of shared memory that contains
associated control structures. Among the structures is a cycle number
corresponding to each routine found in the routine directory; a change in
Expand Down Expand Up @@ -6626,7 +6626,7 @@
o To effect auto-relink, YottaDB creates small temporary files in the
directory referred to by $ydb_linktmpdir (defaulting to $ydb_tmp,
which in turn defaults to /tmp, if unspecified). The names of these
files are of the form gtm-relinkctl<md5sum> where <md5sum> is a hash
files are of the form ydb-relinkctl<md5sum> where <md5sum> is a hash
of the realpath() to an auto-relink directory. The group and
permissions match those for the directory as described in the section
Shared Resources Authorization Permissions in Appendix E (YottaDB
Expand Down Expand Up @@ -6850,7 +6850,7 @@
NTW:203,NTR:4,NBW:212,NBR:414,NR0:0,NR1:0,NR2:0,NR3:0,TTW:1,TTR:0,TRB:0,TBW:2,TBR:6,
TR0:0,TR1:0,TR2:0,TR3:0,TR4:0,TC0:0,TC1:0,TC2:0,TC3:0,TC4:0,ZTR:0,DFL:0,DFS:0,JFL:0,JFS:0,JBB:0,JFB:0,JFW:0,JRL:0,JRP:0,
JRE:0,JRI:0,JRO:0,JEX:0,DEX:0,CAT:4,CFE:0,CFS:0,CFT:0,CQS:0,CQT:0,CYS:0,CYT:0,BTD:0
GLD:/home/gtmuser1/.fis-gtm/V5.4-002B_x86/g/mumps.gld,REG:DEFAULT,SET:205,KIL:0,GET:1,
GLD:/home/gtmuser1/.yottadb/r122_x86_64/g/mumps.gld,REG:DEFAULT,SET:205,KIL:0,GET:1,
DTA:0,ORD:0,ZPR:0,QRY:0,LKS:0,LKF:0,CTN:411,DRD:9,DWT:15,NTW:2
03,NTR:4,NBW:212,NBR:414,NR0:0,NR1:0,NR2:0,NR3:0,TTW:1,TTR:0,TRB:0,TBW:2,TBR:6,TR0:0,
TR1:0,TR2:0,TR3:0,TR4:0,TC0:0,TC1:0,TC2:0,TC3:0,TC4:0
Expand Down Expand Up @@ -8432,7 +8432,7 @@

Example:

/usr/lib/fis-gtm/V5.4-002B_x86/gtm -run ^dstackex
/usr/local/lib/yottadb/r122/ydb -run ^dstackex
dstackex;
zprint ^dstackex
write !,$STACK
Expand Down Expand Up @@ -9022,7 +9022,7 @@
variable with an agreed prefix (e.g., "%") and its $ZAHANDLE() as a
suffix. The handle can be returned as the value.

$ /usr/lib/fis-gtm/V5.4-002B_x86/gtm -run retval
$ /usr/local/lib/yottadb/r122/ydb -run retval
retval ; Return an array / object from a function
;;Data for the object array
;;Albert Einstein,14-March-1879
Expand Down Expand Up @@ -9902,10 +9902,10 @@

YDB>set x=$zjobexam()
YDB>write x
/home/gtmuser1/.fis-gtm/V5.4-002B_x86/r/GTM_JOBEXAM.ZSHOW_DMP_28760_1
/home/gtmuser1/.yottadb/r122_x86_64/r/GTM_JOBEXAM.ZSHOW_DMP_28760_1
YDB>set x=$zjobexam("test.file")
YDB>write x
/home/gtmuser1/.fis-gtm/V5.4-002B_x86/r/test.file
/home/gtmuser1/.yottadb/r122_x86_64/r/test.file
YDB>

Shows default file name and type of the files created containing the zshow
Expand Down Expand Up @@ -10117,7 +10117,7 @@
Example:

$ cd /usr/work/me
$ /usr/lib/fis-gtm/V5.4-002B_x86/gtm
$ /usr/local/lib/yottadb/r122/ydb
YDB>For i="DIRECTORY","NAME","TYPE","" Write $ZPARSE("test.m",i),!
/usr/work/me/
test
Expand Down Expand Up @@ -10777,7 +10777,7 @@
Example:

YDB>write $ztrnlnm("ydb_dist","","","","","VALUE")
/usr/lib/fis-gtm/V6.0-000_x86_64/utf8
/usr/local/lib/yottadb/r122/utf8
YDB>

This uses $ZTRNLNM() to display the translation value for ydb_dist.
Expand Down Expand Up @@ -11485,7 +11485,7 @@
Example:

$ export ydb_chset=UTF-8
$ /usr/lib/fis-gtm/V6.0-001_x86/gtm
$ /usr/local/lib/yottadb/r122/ydb
YDB>write $zchset
UTF-8
YDB>
Expand Down Expand Up @@ -12942,7 +12942,7 @@
Example:

$ export sigusrval=10
$ /usr/lib/fis-gtm/V6.1-000_x86_64/gtm
$ /usr/local/lib/yottadb/r122/ydb
YDB>zprint ^ztran
foo;
set $ztexit=1
Expand Down Expand Up @@ -15413,7 +15413,7 @@
"<host>:<port>:TCP", where host is an IPv4 or IPv6 address optionally
encapsulated by square-brackets ([]) like "127.0.0.1", "::1",
"[127.0.0.1]", or "[::1]" or a IPv4 or IPv6 hostname like
server.fis-gtm.com. When a hostname is specified, YottaDB uses the IP version
yottadb.com. When a hostname is specified, YottaDB uses the IP version
of the first address returned by DNS:

o that is supported by the operating system, and
Expand Down Expand Up @@ -19512,7 +19512,7 @@
the collation sequence, and pathname identifies the shared library
containing the routines for that collation sequence, for example:

$ ydb_collate_1=/opt/fis-gtm/collation
$ ydb_collate_1=/opt/yottadb/collation
$ export ydb_collate_1

Multiple alternative collation sequence definitions can co-exist.
Expand Down
16 changes: 8 additions & 8 deletions sr_port/mupip.hlp
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@
processing for all regions before starting archive. For example, a
message like:

DB file /home/jdoe/.fis-gtm/V6.0-001_x86_64/g/gtm.dat backed up in file /backup/gtm.dat
DB file /home/jdoe/.yottadb/r122_x86_64/g/gtm.dat backed up in file /backup/gtm.dat
Transactions up to 0x0000000000E92E04 are backed up.

confirms that gtm.dat is backed up correctly and is ready for archive.
Expand Down Expand Up @@ -2319,15 +2319,15 @@

Given a relinkctl file name, one can find the corresponding directory path
using the Unix "strings" command on the Relinkctl file. For example,
"strings /tmp/gtm-relinkctl-f0938d18ab001a7ef09c2bfba946f002",
"strings /tmp/ydb-relinkctl-f0938d18ab001a7ef09c2bfba946f002",
corresponding to the above MUPIP RCTLDUMP output example, would output
"/obj" the corresponding directory name.

Example:

$ mupip rctldump .
Object Directory : /tmp
Relinkctl filename : /tmp/fis-gtm/V6.2-001_x86_64/gtm-relinkctl-61f9eb418212a24a75327f53106c1656
Relinkctl filename : /tmp/yottadb/r122_x86_64/ydb-relinkctl-61f9eb418212a24a75327f53106c1656
# of routines : 1
# of attached processes : 2
Relinkctl shared memory : shmid: 11534344 shmlen: 0x57c6000
Expand Down Expand Up @@ -5073,12 +5073,12 @@
following is an example of SHOW=HEADER output:

-------------------------------------------------------------------------------
SHOW output for journal file /home/jdoe/.fis-gtm/V6.3-002_x86/g/gtm.mjl
SHOW output for journal file /home/jdoe/.yottadb/r122_x86_64/g/gtm.mjl
-------------------------------------------------------------------------------
Journal file name /home/jdoe/.fis-gtm/V6.3-002_x86/g/gtm.mjl
Journal file name /home/jdoe/.yottadb/r122_x86_64/g/gtm.mjl
Journal file label GDSJNL23
Database file name /home/jdoe/.fis-gtm/V6.3-002_x86/g/gtm.dat
Prev journal file name /home/jdoe/.fis-gtm/V6.3-002_x86/g/gtm.mjl_2012310190106
Database file name /home/jdoe/.yottadb/r122_x86_64/g/gtm.dat
Prev journal file name /home/jdoe/.yottadb/r122_x86_64/g/gtm.mjl_2012310190106
Next journal file name
Before-image journal ENABLED
Journal file header size 65536 [0x00010000]
Expand Down Expand Up @@ -5128,7 +5128,7 @@
qualifiers.The following is an example of SHOW=STATISTICS output:

-------------------------------------------------------------------------------
SHOW output for journal file /home/jdoe/.fis-gtm/V6.3-002_x86/g/gtm.mjl
SHOW output for journal file /home/jdoe/.yottadb/r122_x86_64/g/gtm.mjl
-------------------------------------------------------------------------------
Record type Count
----------------------
Expand Down
6 changes: 3 additions & 3 deletions sr_unix/relinkctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ STATICFNDCL void relinkctl_unmap(open_relinkctl_sgm *linkctl);
STATICFNDCL int relinkctl_fcntl_lock(int fd, int l_type);
STATICFNDCL void relinkctl_delete(open_relinkctl_sgm *linkctl);

#define SLASH_GTM_RELINKCTL "/gtm-relinkctl-"
#define SLASH_GTM_RELINKCTL "/ydb-relinkctl-"
#define SLASH_GTM_RELINKCTL_LEN STRLEN(SLASH_GTM_RELINKCTL)
#define MAX_RCTL_OPEN_RETRIES 16

Expand Down Expand Up @@ -613,15 +613,15 @@ void relinkctl_incr_nattached(boolean_t rtnobj_refcnt_incr_cnt)
}

/* Routine to generate unique key for a $ZROUTINES entry name used to create relinkctl file for that entry in the directory
* $ydb_linktmpdir (e.g. /testarea1/gtm/temp --> $ydb_linktmpdir/gtm-relinkctl-d0f3d074c724430bc1c7679141b96411).
* $ydb_linktmpdir (e.g. /testarea1/gtm/temp --> $ydb_linktmpdir/ydb-relinkctl-d0f3d074c724430bc1c7679141b96411).
* Theoretically, we'd need a scheme to resolve hash collisions. Say, append -<collision_id> to the key.
* But since this is 128-bit MurmurHash3, we can assume a collision will never happen in practice, so we do not
* handle the extremely unlikely event of a hash collision for the few $ZROUTINES entries used by processes using
* the same $ydb_linktmpdir value.
*
* Parameters:
*
* key - Generated as $ydb_linktmpdir/gtm-relinkctl-<hash>. Buffer should be YDB_PATH_MAX bytes (output).
* key - Generated as $ydb_linktmpdir/ydb-relinkctl-<hash>. Buffer should be YDB_PATH_MAX bytes (output).
* zro_entry_name - Address of mstr containing the fully expanded zroutines entry directory name.
*/
int relinkctl_get_key(char key[YDB_PATH_MAX], mstr *zro_entry_name)
Expand Down

0 comments on commit f1e4994

Please sign in to comment.