What is Journaling?

Journaling is a critical IRIS feature and a part of what makes IRIS a reliable database. While journaling is fundamental to IRIS, there are nuances, so I wrote this article to summarize (more briefly than our documentation which has all the details) what you need to know. I realize the irony of saying the 27 minute read is brief.

13 0
3 351

InterSystems FAQ rubric

If the system does not stop for 24 hours, old journal files will be deleted at 0:30 according to the "Journal file deletion settings".

A possible cause of journal files remaining that are older than the "Journal file deletion settings" is that there are transactions that remain open.

In that case, you will be able to delete the journal file by searching for processes executing transactions and finalizing the transactions.

5 3
2 172
Article
· Nov 24, 2023 4m read
Journal File Indexer

Hi community!

In this article, I'm excited to introduce my latest application, Journal File Indexer. The development of this application is rooted in the portal idea DPI-I-270.

In short, this application lets you load and index a log file in a database.

Why?

If you've ever used the log file search function in the management portal, you may have encountered a timeout error or even a blank page. This problem usually occurs when searching a large journal file. Journal File Indexer solves this problem by considerably increasing the speed of searches once the file has been loaded into the database.

Another problem arises during the restoration process. When searching for global entries in a log file to restore old or new values, the management portal doesn't have this specific functionality. A routine must therefore be coded to achieve this. Journal File Indexer comes to the rescue, incorporating a restore function!

6 3
1 185

I'm working for an organisation that is running a very old version of InterSystems Cache (5.016) which runs on AIX . The last two times we have re-booted Cache, we have encountered rollbacks. I've been asked two questions. During the rollback it was "How long is it going to take?" and after the system returned, it was "So what caused it?". My answer to both was "I don't know".

0 4
0 232

Hi!

Currently, I'm working on a script using %SYS.Journal API.

My journal files are compressed, following the documentation the compression is zstd.

I tried to unzip a file with zstd tool, ex:

apt-get update
apt-get install zstd

zstd -d 20230806.001z -o 20230806.001

20230806.001z        : 92.03%   (909312 => 836859 bytes, 20230806.001) 

Unfortunately, the unzipped file is invalid:

Write ##class(%SYS.Journal.File).IsValidJournal("/usr/irissys/mgr/journal/20230806.001")

1 2
0 163

I have several 1GB journals from a LIVE server that I would like to inspect (eg: check which globals have been updated over the time).

Is there a simple way to view those journals using another IRIS instance ? (eg: local installation).

I have been tempted to put those files directly into the journal folder of my local installation and restart the system, however I am concerned that the transactions they contains will be restored and will corrupt the local database.

0 10
1 213

Recently I needed to restore a version of a production class, which was overwritten by compilation and running UpdateProduction. As the correct version was unavailable in the source control, I used journals to restore the data. Journals store a plethora of information about what's happening in the system and are quite a powerful tool. This article explains how to work with journals to extract the data you require.

5 0
0 158

In the Windows Ressource Manager I can observe multiple parallel processes coming from cache.exe with read operations to journaling files.

All except one of these processes have the same reads(Byte/s). The processes point to different journal files and constantly read between 200 and 3000 Bytes/s.

The corresponding process via PID in the management portal of Caché shows the process %SYS.Monitor.Control.1. In 3 days of uptime on the server it has run 181.632.583 commands and modified 32.140.642 globals.

0 2
0 148
Question
· Oct 7, 2022
Mirror Failover Settings

Hi All,

Our mirrored HealthShare environment has failed over a few times recently due to underlying infrastructure issues (that are being worked on and resolved).

In the HealthShare logs we are seeing:

10/06/22-00:54:35:925 (4736) 1 Journal Daemon has been inactive with I/O pending for 10 seconds:
gjrnoff=524741316,iocomplete=523852600,filecnt=1011,fail=0
10/06/22-00:54:55:086 (4736) 3 CP: Pausing users because Journal Daemon has not shown
signs of activity for 30 seconds. Users will resume if Journal Daemon is active again

My question is:

0 4
2 358

Working in support, I usually get asked how many days I should keep journals. Should it be two days or after two backups? More? Less? Why two?

The correct answer (for most of the environments) is that you should keep the journals since the last validated Backup. I.e., until you don't check if a Backup is valid (restoring the file and checking with the Integrity utility), you can't be sure there is a good copy of your data and can't purge the journals safely.

12 7
1 674
Question
· Apr 23, 2021
Log (Journal) shipping

I am new to Cache, we are trying to move a 4 TB database over the internet, but this will be take too long to copy the single backup file. In Oracle and MS-SQL Server there is an option of doing log shipping. Is there such an option in Cache?

I want to copy the initial backup file one weekend, then keep sending the Journals (logs) the new location.

Thank you,

Eudoro

0 5
0 236

Hey everyone.

I have noticed that my backup mirror is warning that the MirrorDatabaseLatencyTime is having a bad time (time in ms is 3000, and warnvalue is 3000). While I look into what may be causing this latency between the two servers, I was considering if reducing the size of the journal files would improve this value in any way.

My assumption is that reducing the file size would mean that the frequency of the journal files being created would be increased, but the reduced size would mean that the transfer and application of each file would be reduced.

0 2
0 561

Hi,

We are using CACHE 2017.2.1, I would like to retrieve data from Journal for killed global. Let say we have global name ^ EMP(123) with data and also have some child nodes and it has been killed by using cache kill command for some reason and we don't know who has executed this and when. My questions are below.

1) Can we get back the data of killed global from journal files,Is it possible or not ?

0 5
0 551

In this article I'd like to share with you a phenomena that is best you avoid - something you should be aware of when designing your data model (or building your Business Processes) in Caché or in Ensemble (or older HealthShare Health Connect Ensemble-based versions).

3 2
0 341
Question
· Mar 30, 2020
Error Switching Journal

Hi,

I'm having a problem when I'm attempting to freeze the instance.

I have a pre-script and post-script to freeze and unfreeze the instance, but when the script execute:

 csession INSTANCE_NAME -U '%SYS' "##Class(Backup.General).ExternalFreeze(\"$SNAPLOG\",,,,,,1800)"

It's give me this error and fails the freeze:

Backup.General.ExternalFreeze: Failed, Unable to switch local journal file, Error: -99,ERROR #1142: Error switching journal file: 0
vi

At cconsole.log file show this:

0 4
0 485

I'm a DBA and support Caché databases on AIX. I coded shell scripts for monitoring journaling status, databases size, license end date.

We recently got a new instance of Caché on Windows. I'm just curious to know whether anyone coded database monitoring scripts on Windows using PowerShell or any other scripting language.

If yes, please share the details.

Thanks & Regards,

Bharath Nunepalli.

0 3
0 438

Just wondering if anyone knows if there is a way to get daily emails or alerts about changes to a cache database. I know that all of that information is contained within the journal files, just wondering if there is a way to bundle it up each day and send it off for auditing, etc.

Any solution where a plain-text/readable format of changes to the cache database could be sent or stored for review would solve the issue.

Thanks!

0 3
0 379

Hello, community!

I've stumbled on some unexpected behavior, and decided to check with you if this is normal. Basically, I'm rebuilding indices and the result is not journaling (which leads to missing indices at shadow server).

The $ZV is "Cache for UNIX (Red Hat Enterprise Linux for x86-64) 2015.2.1 (Build 705U) Mon Aug 31 2015 16:53:38 EDT"

I have an example class

Class tmp.A As %Persistent;

Index IP1 On P1;

Property P1 As %String;

for example there is one object which have P1 = 1, so

0 1
0 269

Hi,

We have Mirroring established between NODE 1 & Node 2 . We have set the "cachesys" database enabled for Journalling. But we dont see the User Accounts , Roles, Resources created on Node 1 ( favoured Primary) reflected on Node 2 . Is creating them manually again is the only option for this ? . Is there any way to sync them or would adding %SYS to MIRROR a possible solution. Would it be great if anyone has faced this as we have an issue that during failovers Team is locked out .

Best Regards,

Arun Madhan

1 10
1 730