About 2 yrs ago, I asked about turning off journaling for particular globals in this thread: https://groups.google.com/g/comp.lang.mumps/c/ozA_Z1tXx-0/m/9-GMTTTzAwAJCacheTempEWD, ^CacheTempUserNode, and ^zewdDOM as part of its HTML parsing. All of this is temporary stuff and doesn't need to be journalled. But it was being journalled, and the files used up all available space.
Today our hard disk ran out of space because of excessive journal files, and I was puzzled as to why. Long story short, I was scanning through all our records in VistA, file 8925. Each file was being parsed via EWD code. And that code makes writes to ^
In that other post, Bhaskar replied with: https://docs.yottadb.com/AcculturationGuide/acculturation.html#global-directories-point-to-global-variables shows how a region defines a set of global variables to be mapped to a database file.
So I have looked at this again. I understand that 1 or more Global comprises a region and ultimately can be specified to be stored in a particular database.dat file.
So my question is, In order to turn off journalling on the above unwanted globals, would I have to 1) create a new database.dat file, 2) map these globals to it and 3) ensure that journalling is off for that database.dat file?
Is there an easier way?
Actually, I think that journalling is specified per region, and if that is true, then do I need to map the unwanted globals to a new region, but keep them in the same mumps.dat file??
Thank you in advance
Kevin T
You only need to do (1b) or (5b), and if you opt for 5(b) you will need a global directory that maps the scratch globals to the old region. ...versa.
Yes, journaling is by region: either a region is journaled or not, and all global variables in that region are journaled. Also, replication and journaling are linked in that when replication is used, all replicated regions must be journaled and vice
Incidentally %YDBJNLF (released as beta test software with r1.36) in conjunction with Octo, eases the analysis of journal files.
On Friday, March 3, 2023 at 11:36:38 AM UTC-5, K.S. Bhaskar wrote:
I am going to break this down to understand this better.how to add a region to an existing database. I ran the mupip command, entered HELP->Summary, and I find this
(1) Shut down the application. (1b) Kill the scratch globals. -- no problem here.
(2) Create a new unjournaled region. It can use the MM access method.
I'm not clear how to do this step. From other recent conversations, I know that before a database is setup, one could do this with ^DSE , followed by a MUPIP CREATE. But for an existing database, one needs to use MUPIP. But I can't find any examples of
+----------------------------------------------------------------------------------+add a region to my database?
| COMMAND | OBJECTS | MAIN QUALIFIER |
| | | | |-----------+----------------+-----------------------------------------------------|
|CR[EATE] |- |-R[EGION]=region-name |
But I don't know what it means to have "-" as an OBJECT
If I enter HELP-> GDM->Create, I find this (I don't know what GDM refers to):
CREATE
CREATE
Creates and initializes database files using the information in a Global Directory file. If a file already exists for any segment, MUPIP CREATE
takes no action for that segment.
The format of the CREATE command is:
CR[EATE] [-R[EGION]=region-name]
The single optional -REGION qualifier specifies a region for which to
create a database file.
But I don't understand the sentence: "If a file already exists for any segment, MUPIP CREATE takes no action for that segment." Does this mean that I can't use MUPIP CREATE -REGION on am existing database? That is what it seems to say. If so, how do I
(3) Map the scratch globals to the new region. <-- I'll have to figure this out after the step above...versa.
(5a) Resume the application.
(5b) Kill the scratch globals in the old database region.
You only need to do (1b) or (5b), and if you opt for 5(b) you will need a global directory that maps the scratch globals to the old region. ...
Yes, journaling is by region: either a region is journaled or not, and all global variables in that region are journaled. Also, replication and journaling are linked in that when replication is used, all replicated regions must be journaled and vice
Incidentally %YDBJNLF (released as beta test software with r1.36) in conjunction with Octo, eases the analysis of journal files.
Can anyone help me figure out how to add a region to my yottadb database?
Thanks
Kevin
On Friday, March 3, 2023 at 6:06:26 PM UTC-5, kdtop wrote:
On Friday, March 3, 2023 at 11:36:38 AM UTC-5, K.S. Bhaskar wrote:
of how to add a region to an existing database. I ran the mupip command, entered HELP->Summary, and I find thisI am going to break this down to understand this better.
(1) Shut down the application. (1b) Kill the scratch globals. -- no problem here.
(2) Create a new unjournaled region. It can use the MM access method.
I'm not clear how to do this step. From other recent conversations, I know that before a database is setup, one could do this with ^DSE , followed by a MUPIP CREATE. But for an existing database, one needs to use MUPIP. But I can't find any examples
I add a region to my database?+----------------------------------------------------------------------------------+
| COMMAND | OBJECTS | MAIN QUALIFIER |
| | | | |-----------+----------------+-----------------------------------------------------|
|CR[EATE] |- |-R[EGION]=region-name |
But I don't know what it means to have "-" as an OBJECT
If I enter HELP-> GDM->Create, I find this (I don't know what GDM refers to):
CREATE
CREATE
Creates and initializes database files using the information in a Global Directory file. If a file already exists for any segment, MUPIP CREATE takes no action for that segment.
The format of the CREATE command is:
CR[EATE] [-R[EGION]=region-name]
The single optional -REGION qualifier specifies a region for which to create a database file.
But I don't understand the sentence: "If a file already exists for any segment, MUPIP CREATE takes no action for that segment." Does this mean that I can't use MUPIP CREATE -REGION on am existing database? That is what it seems to say. If so, how do
vice versa.(3) Map the scratch globals to the new region. <-- I'll have to figure this out after the step above...
(5a) Resume the application.
(5b) Kill the scratch globals in the old database region.
You only need to do (1b) or (5b), and if you opt for 5(b) you will need a global directory that maps the scratch globals to the old region. ...
Yes, journaling is by region: either a region is journaled or not, and all global variables in that region are journaled. Also, replication and journaling are linked in that when replication is used, all replicated regions must be journaled and
database. But then it gives and example:Incidentally %YDBJNLF (released as beta test software with r1.36) in conjunction with Octo, eases the analysis of journal files.
Can anyone help me figure out how to add a region to my yottadb database?
ThanksI also found this: https://docs.yottadb.com/AdminOpsGuide/dbmgmt.html#region which is an easier format to read.
Kevin
But I still don't understand it. First it says that MUPIP CREATE "Creates and initializes database files using the information in a Global Directory file." And it is the directory file, I thought that defines database structure when first creating a
$ mupip create -region=MAMMALS
What is the purpose here of specifying the -region=MAMMALS?? Wouldn't this already have been set up in the global directory file? What if it conflicts with the global directory file?
Confused...
Kevin T
On Sunday, March 5, 2023 at 1:50:57 PM UTC-5, K.S. Bhaskar wrote:
On Friday, March 3, 2023 at 6:20:48 PM UTC-5, kdtop wrote:
On Friday, March 3, 2023 at 6:06:26 PM UTC-5, kdtop wrote:
On Friday, March 3, 2023 at 11:36:38 AM UTC-5, K.S. Bhaskar wrote:
examples of how to add a region to an existing database. I ran the mupip command, entered HELP->Summary, and I find thisI am going to break this down to understand this better.
(1) Shut down the application. (1b) Kill the scratch globals. -- no problem here.
(2) Create a new unjournaled region. It can use the MM access method. I'm not clear how to do this step. From other recent conversations, I know that before a database is setup, one could do this with ^DSE , followed by a MUPIP CREATE. But for an existing database, one needs to use MUPIP. But I can't find any
do I add a region to my database?+----------------------------------------------------------------------------------+
| COMMAND | OBJECTS | MAIN QUALIFIER |
| | | | |-----------+----------------+-----------------------------------------------------|
|CR[EATE] |- |-R[EGION]=region-name |
But I don't know what it means to have "-" as an OBJECT
If I enter HELP-> GDM->Create, I find this (I don't know what GDM refers to):
CREATE
CREATE
Creates and initializes database files using the information in a Global
Directory file. If a file already exists for any segment, MUPIP CREATE takes no action for that segment.
The format of the CREATE command is:
CR[EATE] [-R[EGION]=region-name]
The single optional -REGION qualifier specifies a region for which to create a database file.
But I don't understand the sentence: "If a file already exists for any segment, MUPIP CREATE takes no action for that segment." Does this mean that I can't use MUPIP CREATE -REGION on am existing database? That is what it seems to say. If so, how
vice versa.(3) Map the scratch globals to the new region. <-- I'll have to figure this out after the step above...
(5a) Resume the application.
(5b) Kill the scratch globals in the old database region.
You only need to do (1b) or (5b), and if you opt for 5(b) you will need a global directory that maps the scratch globals to the old region. ...
Yes, journaling is by region: either a region is journaled or not, and all global variables in that region are journaled. Also, replication and journaling are linked in that when replication is used, all replicated regions must be journaled and
a database. But then it gives and example:Incidentally %YDBJNLF (released as beta test software with r1.36) in conjunction with Octo, eases the analysis of journal files.
Can anyone help me figure out how to add a region to my yottadb database?
ThanksI also found this: https://docs.yottadb.com/AdminOpsGuide/dbmgmt.html#region which is an easier format to read.
Kevin
But I still don't understand it. First it says that MUPIP CREATE "Creates and initializes database files using the information in a Global Directory file." And it is the directory file, I thought that defines database structure when first creating
that the global directory entries were somehow infused into the database file (e.g. mumps.dat). But instead, the global directory IS the place where that mapping is stored, and it is used each session.$ mupip create -region=MAMMALS
What is the purpose here of specifying the -region=MAMMALS?? Wouldn't this already have been set up in the global directory file? What if it conflicts with the global directory file?
Confused...
Kevin TA global directory has two uses:
- It maps global variables to regions, and regions to database files. It always has this use.
- When MUPIP CREATE creates a database file, a global directory provides required parameters: file name, block size, etc. Once a database file exists for a region, these parameters in a global directory are ignored.
MUPIP CREATE with no arguments creates database files for any region in the global directory that (a) does not already have database files; and (b) does not have the AutoDB flag set (https://docs.yottadb.com/AdminOpsGuide/gde.html#no-au-todb).
MUPIP CREATE with regions specified, creates database files for those regions specified if they don't already have database files. It ignores other regions.
There can be no conflict, because for a process using a global directory, a region name uniquely maps to a file name. If that process happens to be a MUPIP CREATE process, either the database file exists or it does not.
It might help if you to try to formulate, as a thought experiment, a scenario in which the conflict you envision might arise.
RegardsSam Habiel reached out and was able to help me understand some things.
– Bhaskar
-- When it is stated that the global directory "maps global variables to regions, and regions to database files", this is not just during setup or creation of the database etc. It is used each mumps session in an ongoing manner. I had been thinking
-- To have a separate region (and every ^global is mapped to 1 region, a region can hold many different ^globals), it is required to have a separate database (e.g. mumps.dat) file. So in my case, we needed to make a tempgbl.dat file to store the tempglobals in.
So to get started with a fix, we edited my mumps.gde file as follows, where the globals that are not to be journalled are mapped to a TEMPGBL region
=======================
change -segment DEFAULT -file="/opt/worldvista/EHR/g/default.dat" -allocation=200000 -block_size=4096 -global_buffer_count=4096 -lock_space=1024 -extension_count=0
change -region DEFAULT -record_size=4080 -key_size=255
add -segment TEMPGBL -file="/opt/worldvista/EHR/g/tempgbl.dat" -access_method=MM -allocation=10000 -block_size=4096 -lock_space=1000 -extension_count=2560
add -region TEMPGBL -record_size=4096 -stdnullcoll -key_size=512 -dynamic=TEMPGBL
! Add globals to the temporary region
add -name HLTMP -region=TEMPGBL
add -name TMP -region=TEMPGBL
add -name UTILITY -region=TEMPGBL
add -name VPRHTTP -region=TEMPGBL
add -name KMPTMP -region=TEMPGBL
add -name ZZ* -region=TEMPGBL
add -name CacheTempEWD -region=TEMPGBL
add -name CacheTempUserNode -region=TEMPGBL
add -name zewdDOM -region=TEMPGBL
show -all
=======================
I made sure my vista service was turned off via:
systemctl stop vista
We then followed the instructions given here: https://www.hardhats.org/projects/New/InstallVistAOnGTM.html
and converted the following instruction line
mumps -run ^GDE < g/db.gde |& tee g/db.gde.out
to match my system, as follows:
$gtm_dist/mumps -run ^GDE < ./mumps.gde |& tee ./mumps.gde.out
We then followed instruction to do: mupip create and this created the tempgbl.dat file
We then went into mumps and created a value in ^TMP, via: SET ^TMP="123" and then exited to the command prompt
We then checked database integrity as follows:
$gtm_dist/mupip integ -full -reg TEMPGBL
Integ of region TEMPGBL
Directory tree
Level Blocks Records % Used Adjacent
1 1 1 0.585 NA
0 1 1 0.805 NA
Global variable ^TMP
Level Blocks Records % Used Adjacent
1 1 1 0.585 1
0 1 1 0.659 1
No errors detected by integ.
Type Blocks Records % Used Adjacent
Directory 2 2 0.695 NA
Index 1 1 0.585 1
Data 1 1 0.659 1
Free 9996 NA NA NA
Total 10000 4 NA 2
kdt0p@ubuntu64:/opt/worldvista/EHR/g$
At the end, I restarted my vista service as follows: kdt0p@ubuntu64:/opt/worldvista/EHR/g$ sudo systemctl start vista
And from here I should be good. I have not turned on journalling for this new TEMPGBL region, so they will no longer fill up my hard drive.
Hurrah!
Thank you Bhaskar and Sam and the entire team at YottaDB.
Kevin T
On Friday, March 3, 2023 at 6:20:48 PM UTC-5, kdtop wrote:
On Friday, March 3, 2023 at 6:06:26 PM UTC-5, kdtop wrote:
On Friday, March 3, 2023 at 11:36:38 AM UTC-5, K.S. Bhaskar wrote:
examples of how to add a region to an existing database. I ran the mupip command, entered HELP->Summary, and I find thisI am going to break this down to understand this better.
(1) Shut down the application. (1b) Kill the scratch globals. -- no problem here.
(2) Create a new unjournaled region. It can use the MM access method. I'm not clear how to do this step. From other recent conversations, I know that before a database is setup, one could do this with ^DSE , followed by a MUPIP CREATE. But for an existing database, one needs to use MUPIP. But I can't find any
do I add a region to my database?+----------------------------------------------------------------------------------+
| COMMAND | OBJECTS | MAIN QUALIFIER |
| | | | |-----------+----------------+-----------------------------------------------------|
|CR[EATE] |- |-R[EGION]=region-name |
But I don't know what it means to have "-" as an OBJECT
If I enter HELP-> GDM->Create, I find this (I don't know what GDM refers to):
CREATE
CREATE
Creates and initializes database files using the information in a Global Directory file. If a file already exists for any segment, MUPIP CREATE takes no action for that segment.
The format of the CREATE command is:
CR[EATE] [-R[EGION]=region-name]
The single optional -REGION qualifier specifies a region for which to create a database file.
But I don't understand the sentence: "If a file already exists for any segment, MUPIP CREATE takes no action for that segment." Does this mean that I can't use MUPIP CREATE -REGION on am existing database? That is what it seems to say. If so, how
vice versa.(3) Map the scratch globals to the new region. <-- I'll have to figure this out after the step above...
(5a) Resume the application.
(5b) Kill the scratch globals in the old database region.
You only need to do (1b) or (5b), and if you opt for 5(b) you will need a global directory that maps the scratch globals to the old region. ...
Yes, journaling is by region: either a region is journaled or not, and all global variables in that region are journaled. Also, replication and journaling are linked in that when replication is used, all replicated regions must be journaled and
database. But then it gives and example:Incidentally %YDBJNLF (released as beta test software with r1.36) in conjunction with Octo, eases the analysis of journal files.
Can anyone help me figure out how to add a region to my yottadb database?
ThanksI also found this: https://docs.yottadb.com/AdminOpsGuide/dbmgmt.html#region which is an easier format to read.
Kevin
But I still don't understand it. First it says that MUPIP CREATE "Creates and initializes database files using the information in a Global Directory file." And it is the directory file, I thought that defines database structure when first creating a
$ mupip create -region=MAMMALS
What is the purpose here of specifying the -region=MAMMALS?? Wouldn't this already have been set up in the global directory file? What if it conflicts with the global directory file?
Confused...
Kevin TA global directory has two uses:
- It maps global variables to regions, and regions to database files. It always has this use.
- When MUPIP CREATE creates a database file, a global directory provides required parameters: file name, block size, etc. Once a database file exists for a region, these parameters in a global directory are ignored.
MUPIP CREATE with no arguments creates database files for any region in the global directory that (a) does not already have database files; and (b) does not have the AutoDB flag set (https://docs.yottadb.com/AdminOpsGuide/gde.html#no-au-todb).
MUPIP CREATE with regions specified, creates database files for those regions specified if they don't already have database files. It ignores other regions.
There can be no conflict, because for a process using a global directory, a region name uniquely maps to a file name. If that process happens to be a MUPIP CREATE process, either the database file exists or it does not.
It might help if you to try to formulate, as a thought experiment, a scenario in which the conflict you envision might arise.
Regards
– Bhaskar
systemctl stop vista
On Wednesday, March 8, 2023 at 11:24:01 AM UTC-5, kdtop wrote:
On Sunday, March 5, 2023 at 1:50:57 PM UTC-5, K.S. Bhaskar wrote:
On Friday, March 3, 2023 at 6:20:48 PM UTC-5, kdtop wrote:
On Friday, March 3, 2023 at 6:06:26 PM UTC-5, kdtop wrote:
On Friday, March 3, 2023 at 11:36:38 AM UTC-5, K.S. Bhaskar wrote:
examples of how to add a region to an existing database. I ran the mupip command, entered HELP->Summary, and I find thisI am going to break this down to understand this better.
(1) Shut down the application. (1b) Kill the scratch globals. -- no problem here.
(2) Create a new unjournaled region. It can use the MM access method.
I'm not clear how to do this step. From other recent conversations, I know that before a database is setup, one could do this with ^DSE , followed by a MUPIP CREATE. But for an existing database, one needs to use MUPIP. But I can't find any
how do I add a region to my database?+----------------------------------------------------------------------------------+
| COMMAND | OBJECTS | MAIN QUALIFIER |
| | | | |-----------+----------------+-----------------------------------------------------|
|CR[EATE] |- |-R[EGION]=region-name |
But I don't know what it means to have "-" as an OBJECT
If I enter HELP-> GDM->Create, I find this (I don't know what GDM refers to):
CREATE
CREATE
Creates and initializes database files using the information in a Global
Directory file. If a file already exists for any segment, MUPIP CREATE
takes no action for that segment.
The format of the CREATE command is:
CR[EATE] [-R[EGION]=region-name]
The single optional -REGION qualifier specifies a region for which to
create a database file.
But I don't understand the sentence: "If a file already exists for any segment, MUPIP CREATE takes no action for that segment." Does this mean that I can't use MUPIP CREATE -REGION on am existing database? That is what it seems to say. If so,
and vice versa.(3) Map the scratch globals to the new region. <-- I'll have to figure this out after the step above...
(5a) Resume the application.
(5b) Kill the scratch globals in the old database region.
You only need to do (1b) or (5b), and if you opt for 5(b) you will need a global directory that maps the scratch globals to the old region. ...
Yes, journaling is by region: either a region is journaled or not, and all global variables in that region are journaled. Also, replication and journaling are linked in that when replication is used, all replicated regions must be journaled
creating a database. But then it gives and example:Incidentally %YDBJNLF (released as beta test software with r1.36) in conjunction with Octo, eases the analysis of journal files.
Can anyone help me figure out how to add a region to my yottadb database?
ThanksI also found this: https://docs.yottadb.com/AdminOpsGuide/dbmgmt.html#region which is an easier format to read.
Kevin
But I still don't understand it. First it says that MUPIP CREATE "Creates and initializes database files using the information in a Global Directory file." And it is the directory file, I thought that defines database structure when first
that the global directory entries were somehow infused into the database file (e.g. mumps.dat). But instead, the global directory IS the place where that mapping is stored, and it is used each session.$ mupip create -region=MAMMALS
What is the purpose here of specifying the -region=MAMMALS?? Wouldn't this already have been set up in the global directory file? What if it conflicts with the global directory file?
Confused...
Kevin TA global directory has two uses:
- It maps global variables to regions, and regions to database files. It always has this use.
- When MUPIP CREATE creates a database file, a global directory provides required parameters: file name, block size, etc. Once a database file exists for a region, these parameters in a global directory are ignored.
MUPIP CREATE with no arguments creates database files for any region in the global directory that (a) does not already have database files; and (b) does not have the AutoDB flag set (https://docs.yottadb.com/AdminOpsGuide/gde.html#no-au-todb).
MUPIP CREATE with regions specified, creates database files for those regions specified if they don't already have database files. It ignores other regions.
There can be no conflict, because for a process using a global directory, a region name uniquely maps to a file name. If that process happens to be a MUPIP CREATE process, either the database file exists or it does not.
It might help if you to try to formulate, as a thought experiment, a scenario in which the conflict you envision might arise.
RegardsSam Habiel reached out and was able to help me understand some things.
– Bhaskar
-- When it is stated that the global directory "maps global variables to regions, and regions to database files", this is not just during setup or creation of the database etc. It is used each mumps session in an ongoing manner. I had been thinking
globals in.-- To have a separate region (and every ^global is mapped to 1 region, a region can hold many different ^globals), it is required to have a separate database (e.g. mumps.dat) file. So in my case, we needed to make a tempgbl.dat file to store the temp
So to get started with a fix, we edited my mumps.gde file as follows, where the globals that are not to be journalled are mapped to a TEMPGBL region
=======================
change -segment DEFAULT -file="/opt/worldvista/EHR/g/default.dat" -allocation=200000 -block_size=4096 -global_buffer_count=4096 -lock_space=1024 -extension_count=0
change -region DEFAULT -record_size=4080 -key_size=255
add -segment TEMPGBL -file="/opt/worldvista/EHR/g/tempgbl.dat" -access_method=MM -allocation=10000 -block_size=4096 -lock_space=1000 -extension_count=2560
add -region TEMPGBL -record_size=4096 -stdnullcoll -key_size=512 -dynamic=TEMPGBL
! Add globals to the temporary region
add -name HLTMP -region=TEMPGBL
add -name TMP -region=TEMPGBL
add -name UTILITY -region=TEMPGBL
add -name VPRHTTP -region=TEMPGBL
add -name KMPTMP -region=TEMPGBL
add -name ZZ* -region=TEMPGBL
add -name CacheTempEWD -region=TEMPGBL
add -name CacheTempUserNode -region=TEMPGBL
add -name zewdDOM -region=TEMPGBL
show -all
=======================
I made sure my vista service was turned off via:
systemctl stop vista
We then followed the instructions given here: https://www.hardhats.org/projects/New/InstallVistAOnGTM.html
and converted the following instruction line
mumps -run ^GDE < g/db.gde |& tee g/db.gde.out
to match my system, as follows:
$gtm_dist/mumps -run ^GDE < ./mumps.gde |& tee ./mumps.gde.out
We then followed instruction to do: mupip create and this created the tempgbl.dat file
We then went into mumps and created a value in ^TMP, via: SET ^TMP="123" and then exited to the command prompt
We then checked database integrity as follows:
$gtm_dist/mupip integ -full -reg TEMPGBL
stored in the .gld file.Integ of region TEMPGBL
Directory tree
Level Blocks Records % Used Adjacent
1 1 1 0.585 NA
0 1 1 0.805 NA
Global variable ^TMP
Level Blocks Records % Used Adjacent
1 1 1 0.585 1
0 1 1 0.659 1
No errors detected by integ.
Type Blocks Records % Used Adjacent
Directory 2 2 0.695 NA
Index 1 1 0.585 1
Data 1 1 0.659 1
Free 9996 NA NA NA
Total 10000 4 NA 2
kdt0p@ubuntu64:/opt/worldvista/EHR/g$
At the end, I restarted my vista service as follows: kdt0p@ubuntu64:/opt/worldvista/EHR/g$ sudo systemctl start vista
And from here I should be good. I have not turned on journalling for this new TEMPGBL region, so they will no longer fill up my hard drive.
Hurrah!
Thank you Bhaskar and Sam and the entire team at YottaDB.
Kevin TI made a slight mistake. The mumps.gde file that I showed above mapped the DEFAULT region to a default.dat database file. On my system, we have used mumps.dat as our database file.
So I corrected this in the mumps.gde file. I then ran the command again: $gtm_dist/mumps -run ^GDE < ./mumps.gde |& tee ./mumps.gde.out
And a concept I think I missed before is that it is not the mumps.gde file that is the global directory. It is the mumps.gld file that holds this. And the above command somehow takes commands from the .gde file and "compiles" the changes and they are
Anyway, I went into mumps via: mumps -dir
and then do ^GDE, and then show -a and it all looks good now
KevinJust a minor correction:
On Wednesday, March 8, 2023 at 12:10:22 PM UTC-5, kdtop wrote:
On Wednesday, March 8, 2023 at 11:24:01 AM UTC-5, kdtop wrote:
On Sunday, March 5, 2023 at 1:50:57 PM UTC-5, K.S. Bhaskar wrote:
On Friday, March 3, 2023 at 6:20:48 PM UTC-5, kdtop wrote:
On Friday, March 3, 2023 at 6:06:26 PM UTC-5, kdtop wrote:
On Friday, March 3, 2023 at 11:36:38 AM UTC-5, K.S. Bhaskar wrote:
examples of how to add a region to an existing database. I ran the mupip command, entered HELP->Summary, and I find thisI am going to break this down to understand this better.
(1) Shut down the application. (1b) Kill the scratch globals. -- no problem here.
(2) Create a new unjournaled region. It can use the MM access method.
I'm not clear how to do this step. From other recent conversations, I know that before a database is setup, one could do this with ^DSE , followed by a MUPIP CREATE. But for an existing database, one needs to use MUPIP. But I can't find any
how do I add a region to my database?+----------------------------------------------------------------------------------+
| COMMAND | OBJECTS | MAIN QUALIFIER |
| | | | |-----------+----------------+-----------------------------------------------------|
|CR[EATE] |- |-R[EGION]=region-name |
But I don't know what it means to have "-" as an OBJECT
If I enter HELP-> GDM->Create, I find this (I don't know what GDM refers to):
CREATE
CREATE
Creates and initializes database files using the information in a Global
Directory file. If a file already exists for any segment, MUPIP CREATE
takes no action for that segment.
The format of the CREATE command is:
CR[EATE] [-R[EGION]=region-name]
The single optional -REGION qualifier specifies a region for which to
create a database file.
But I don't understand the sentence: "If a file already exists for any segment, MUPIP CREATE takes no action for that segment." Does this mean that I can't use MUPIP CREATE -REGION on am existing database? That is what it seems to say. If so,
and vice versa.(3) Map the scratch globals to the new region. <-- I'll have to figure this out after the step above...
(5a) Resume the application.
(5b) Kill the scratch globals in the old database region.
You only need to do (1b) or (5b), and if you opt for 5(b) you will need a global directory that maps the scratch globals to the old region. ...
Yes, journaling is by region: either a region is journaled or not, and all global variables in that region are journaled. Also, replication and journaling are linked in that when replication is used, all replicated regions must be journaled
creating a database. But then it gives and example:Incidentally %YDBJNLF (released as beta test software with r1.36) in conjunction with Octo, eases the analysis of journal files.
Can anyone help me figure out how to add a region to my yottadb database?
ThanksI also found this: https://docs.yottadb.com/AdminOpsGuide/dbmgmt.html#region which is an easier format to read.
Kevin
But I still don't understand it. First it says that MUPIP CREATE "Creates and initializes database files using the information in a Global Directory file." And it is the directory file, I thought that defines database structure when first
that the global directory entries were somehow infused into the database file (e.g. mumps.dat). But instead, the global directory IS the place where that mapping is stored, and it is used each session.$ mupip create -region=MAMMALS
What is the purpose here of specifying the -region=MAMMALS?? Wouldn't this already have been set up in the global directory file? What if it conflicts with the global directory file?
Confused...
Kevin TA global directory has two uses:
- It maps global variables to regions, and regions to database files. It always has this use.
- When MUPIP CREATE creates a database file, a global directory provides required parameters: file name, block size, etc. Once a database file exists for a region, these parameters in a global directory are ignored.
MUPIP CREATE with no arguments creates database files for any region in the global directory that (a) does not already have database files; and (b) does not have the AutoDB flag set (https://docs.yottadb.com/AdminOpsGuide/gde.html#no-au-todb).
MUPIP CREATE with regions specified, creates database files for those regions specified if they don't already have database files. It ignores other regions.
There can be no conflict, because for a process using a global directory, a region name uniquely maps to a file name. If that process happens to be a MUPIP CREATE process, either the database file exists or it does not.
It might help if you to try to formulate, as a thought experiment, a scenario in which the conflict you envision might arise.
RegardsSam Habiel reached out and was able to help me understand some things.
– Bhaskar
-- When it is stated that the global directory "maps global variables to regions, and regions to database files", this is not just during setup or creation of the database etc. It is used each mumps session in an ongoing manner. I had been thinking
temp globals in.-- To have a separate region (and every ^global is mapped to 1 region, a region can hold many different ^globals), it is required to have a separate database (e.g. mumps.dat) file. So in my case, we needed to make a tempgbl.dat file to store the
So to get started with a fix, we edited my mumps.gde file as follows, where the globals that are not to be journalled are mapped to a TEMPGBL region
=======================
change -segment DEFAULT -file="/opt/worldvista/EHR/g/default.dat" -allocation=200000 -block_size=4096 -global_buffer_count=4096 -lock_space=1024 -extension_count=0
change -region DEFAULT -record_size=4080 -key_size=255
add -segment TEMPGBL -file="/opt/worldvista/EHR/g/tempgbl.dat" -access_method=MM -allocation=10000 -block_size=4096 -lock_space=1000 -extension_count=2560
add -region TEMPGBL -record_size=4096 -stdnullcoll -key_size=512 -dynamic=TEMPGBL
! Add globals to the temporary region
add -name HLTMP -region=TEMPGBL
add -name TMP -region=TEMPGBL
add -name UTILITY -region=TEMPGBL
add -name VPRHTTP -region=TEMPGBL
add -name KMPTMP -region=TEMPGBL
add -name ZZ* -region=TEMPGBL
add -name CacheTempEWD -region=TEMPGBL
add -name CacheTempUserNode -region=TEMPGBL
add -name zewdDOM -region=TEMPGBL
show -all
=======================
I made sure my vista service was turned off via:
systemctl stop vista
We then followed the instructions given here: https://www.hardhats.org/projects/New/InstallVistAOnGTM.html
and converted the following instruction line
mumps -run ^GDE < g/db.gde |& tee g/db.gde.out
to match my system, as follows:
$gtm_dist/mumps -run ^GDE < ./mumps.gde |& tee ./mumps.gde.out
We then followed instruction to do: mupip create and this created the tempgbl.dat file
We then went into mumps and created a value in ^TMP, via: SET ^TMP="123" and then exited to the command prompt
We then checked database integrity as follows:
$gtm_dist/mupip integ -full -reg TEMPGBL
stored in the .gld file.Integ of region TEMPGBL
Directory tree
Level Blocks Records % Used Adjacent
1 1 1 0.585 NA
0 1 1 0.805 NA
Global variable ^TMP
Level Blocks Records % Used Adjacent
1 1 1 0.585 1
0 1 1 0.659 1
No errors detected by integ.
Type Blocks Records % Used Adjacent
Directory 2 2 0.695 NA
Index 1 1 0.585 1
Data 1 1 0.659 1
Free 9996 NA NA NA
Total 10000 4 NA 2
kdt0p@ubuntu64:/opt/worldvista/EHR/g$
At the end, I restarted my vista service as follows: kdt0p@ubuntu64:/opt/worldvista/EHR/g$ sudo systemctl start vista
And from here I should be good. I have not turned on journalling for this new TEMPGBL region, so they will no longer fill up my hard drive.
Hurrah!
Thank you Bhaskar and Sam and the entire team at YottaDB.
Kevin TI made a slight mistake. The mumps.gde file that I showed above mapped the DEFAULT region to a default.dat database file. On my system, we have used mumps.dat as our database file.
So I corrected this in the mumps.gde file. I then ran the command again: $gtm_dist/mumps -run ^GDE < ./mumps.gde |& tee ./mumps.gde.out
And a concept I think I missed before is that it is not the mumps.gde file that is the global directory. It is the mumps.gld file that holds this. And the above command somehow takes commands from the .gde file and "compiles" the changes and they are
Anyway, I went into mumps via: mumps -dir
and then do ^GDE, and then show -a and it all looks good now
that the global directory entries were somehow infused into the database file (e.g. mumps.dat). But instead, the global directory IS the place where that mapping is stored, and it is used each session.KevinJust a minor correction:
On this paragraph:
-- When it is stated that the global directory "maps global variables to regions, and regions to database files", this is not just during setup or creation of the database etc. It is used each mumps session in an ongoing manner. I had been thinking
A global directory is only read at the start of a process. Once it's read, it's not read again. So if you make a change to a global directory, you need to restart your processes in order for them to see the changes.
--Sam
On Wednesday, March 8, 2023 at 12:10:22 PM UTC-5, kdtop wrote:
On Wednesday, March 8, 2023 at 11:24:01 AM UTC-5, kdtop wrote:
On Sunday, March 5, 2023 at 1:50:57 PM UTC-5, K.S. Bhaskar wrote:
On Friday, March 3, 2023 at 6:20:48 PM UTC-5, kdtop wrote:
On Friday, March 3, 2023 at 6:06:26 PM UTC-5, kdtop wrote:
On Friday, March 3, 2023 at 11:36:38 AM UTC-5, K.S. Bhaskar wrote:
examples of how to add a region to an existing database. I ran the mupip command, entered HELP->Summary, and I find thisI am going to break this down to understand this better.
(1) Shut down the application. (1b) Kill the scratch globals. -- no problem here.
(2) Create a new unjournaled region. It can use the MM access method.
I'm not clear how to do this step. From other recent conversations, I know that before a database is setup, one could do this with ^DSE , followed by a MUPIP CREATE. But for an existing database, one needs to use MUPIP. But I can't find any
how do I add a region to my database?+----------------------------------------------------------------------------------+
| COMMAND | OBJECTS | MAIN QUALIFIER |
| | | | |-----------+----------------+-----------------------------------------------------|
|CR[EATE] |- |-R[EGION]=region-name |
But I don't know what it means to have "-" as an OBJECT
If I enter HELP-> GDM->Create, I find this (I don't know what GDM refers to):
CREATE
CREATE
Creates and initializes database files using the information in a Global
Directory file. If a file already exists for any segment, MUPIP CREATE
takes no action for that segment.
The format of the CREATE command is:
CR[EATE] [-R[EGION]=region-name]
The single optional -REGION qualifier specifies a region for which to
create a database file.
But I don't understand the sentence: "If a file already exists for any segment, MUPIP CREATE takes no action for that segment." Does this mean that I can't use MUPIP CREATE -REGION on am existing database? That is what it seems to say. If so,
and vice versa.(3) Map the scratch globals to the new region. <-- I'll have to figure this out after the step above...
(5a) Resume the application.
(5b) Kill the scratch globals in the old database region.
You only need to do (1b) or (5b), and if you opt for 5(b) you will need a global directory that maps the scratch globals to the old region. ...
Yes, journaling is by region: either a region is journaled or not, and all global variables in that region are journaled. Also, replication and journaling are linked in that when replication is used, all replicated regions must be journaled
creating a database. But then it gives and example:Incidentally %YDBJNLF (released as beta test software with r1.36) in conjunction with Octo, eases the analysis of journal files.
Can anyone help me figure out how to add a region to my yottadb database?
ThanksI also found this: https://docs.yottadb.com/AdminOpsGuide/dbmgmt.html#region which is an easier format to read.
Kevin
But I still don't understand it. First it says that MUPIP CREATE "Creates and initializes database files using the information in a Global Directory file." And it is the directory file, I thought that defines database structure when first
that the global directory entries were somehow infused into the database file (e.g. mumps.dat). But instead, the global directory IS the place where that mapping is stored, and it is used each session.$ mupip create -region=MAMMALS
What is the purpose here of specifying the -region=MAMMALS?? Wouldn't this already have been set up in the global directory file? What if it conflicts with the global directory file?
Confused...
Kevin TA global directory has two uses:
- It maps global variables to regions, and regions to database files. It always has this use.
- When MUPIP CREATE creates a database file, a global directory provides required parameters: file name, block size, etc. Once a database file exists for a region, these parameters in a global directory are ignored.
MUPIP CREATE with no arguments creates database files for any region in the global directory that (a) does not already have database files; and (b) does not have the AutoDB flag set (https://docs.yottadb.com/AdminOpsGuide/gde.html#no-au-todb).
MUPIP CREATE with regions specified, creates database files for those regions specified if they don't already have database files. It ignores other regions.
There can be no conflict, because for a process using a global directory, a region name uniquely maps to a file name. If that process happens to be a MUPIP CREATE process, either the database file exists or it does not.
It might help if you to try to formulate, as a thought experiment, a scenario in which the conflict you envision might arise.
RegardsSam Habiel reached out and was able to help me understand some things.
– Bhaskar
-- When it is stated that the global directory "maps global variables to regions, and regions to database files", this is not just during setup or creation of the database etc. It is used each mumps session in an ongoing manner. I had been thinking
temp globals in.-- To have a separate region (and every ^global is mapped to 1 region, a region can hold many different ^globals), it is required to have a separate database (e.g. mumps.dat) file. So in my case, we needed to make a tempgbl.dat file to store the
So to get started with a fix, we edited my mumps.gde file as follows, where the globals that are not to be journalled are mapped to a TEMPGBL region
=======================
change -segment DEFAULT -file="/opt/worldvista/EHR/g/default.dat" -allocation=200000 -block_size=4096 -global_buffer_count=4096 -lock_space=1024 -extension_count=0
change -region DEFAULT -record_size=4080 -key_size=255
add -segment TEMPGBL -file="/opt/worldvista/EHR/g/tempgbl.dat" -access_method=MM -allocation=10000 -block_size=4096 -lock_space=1000 -extension_count=2560
add -region TEMPGBL -record_size=4096 -stdnullcoll -key_size=512 -dynamic=TEMPGBL
! Add globals to the temporary region
add -name HLTMP -region=TEMPGBL
add -name TMP -region=TEMPGBL
add -name UTILITY -region=TEMPGBL
add -name VPRHTTP -region=TEMPGBL
add -name KMPTMP -region=TEMPGBL
add -name ZZ* -region=TEMPGBL
add -name CacheTempEWD -region=TEMPGBL
add -name CacheTempUserNode -region=TEMPGBL
add -name zewdDOM -region=TEMPGBL
show -all
=======================
I made sure my vista service was turned off via:
systemctl stop vista
We then followed the instructions given here: https://www.hardhats.org/projects/New/InstallVistAOnGTM.html
and converted the following instruction line
mumps -run ^GDE < g/db.gde |& tee g/db.gde.out
to match my system, as follows:
$gtm_dist/mumps -run ^GDE < ./mumps.gde |& tee ./mumps.gde.out
We then followed instruction to do: mupip create and this created the tempgbl.dat file
We then went into mumps and created a value in ^TMP, via: SET ^TMP="123" and then exited to the command prompt
We then checked database integrity as follows:
$gtm_dist/mupip integ -full -reg TEMPGBL
stored in the .gld file.Integ of region TEMPGBL
Directory tree
Level Blocks Records % Used Adjacent
1 1 1 0.585 NA
0 1 1 0.805 NA
Global variable ^TMP
Level Blocks Records % Used Adjacent
1 1 1 0.585 1
0 1 1 0.659 1
No errors detected by integ.
Type Blocks Records % Used Adjacent
Directory 2 2 0.695 NA
Index 1 1 0.585 1
Data 1 1 0.659 1
Free 9996 NA NA NA
Total 10000 4 NA 2
kdt0p@ubuntu64:/opt/worldvista/EHR/g$
At the end, I restarted my vista service as follows: kdt0p@ubuntu64:/opt/worldvista/EHR/g$ sudo systemctl start vista
And from here I should be good. I have not turned on journalling for this new TEMPGBL region, so they will no longer fill up my hard drive.
Hurrah!
Thank you Bhaskar and Sam and the entire team at YottaDB.
Kevin TI made a slight mistake. The mumps.gde file that I showed above mapped the DEFAULT region to a default.dat database file. On my system, we have used mumps.dat as our database file.
So I corrected this in the mumps.gde file. I then ran the command again: $gtm_dist/mumps -run ^GDE < ./mumps.gde |& tee ./mumps.gde.out
And a concept I think I missed before is that it is not the mumps.gde file that is the global directory. It is the mumps.gld file that holds this. And the above command somehow takes commands from the .gde file and "compiles" the changes and they are
Anyway, I went into mumps via: mumps -dir
and then do ^GDE, and then show -a and it all looks good now
that the global directory entries were somehow infused into the database file (e.g. mumps.dat). But instead, the global directory IS the place where that mapping is stored, and it is used each session.KevinJust a minor correction:
On this paragraph:
-- When it is stated that the global directory "maps global variables to regions, and regions to database files", this is not just during setup or creation of the database etc. It is used each mumps session in an ongoing manner. I had been thinking
A global directory is only read at the start of a process. Once it's read, it's not read again. So if you make a change to a global directory, you need to restart your processes in order for them to see the changes.
--Sam
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 399 |
Nodes: | 16 (2 / 14) |
Uptime: | 101:47:38 |
Calls: | 8,363 |
Calls today: | 2 |
Files: | 13,165 |
Messages: | 5,898,006 |