Message data global
Hello,
We noticed from the integrity logs that some of the namespaces in our integration engine are using large amount of space ( ~380GB ) for the global ^EnsHL7.Segment.
We have culling implemented for large globals like MessageHeader and MessageBody.
Is it a standard process to implement culling for ^EnsHL7.Segment global and any idea about what will be the impact of adding culling to this global?
Not sure if it is possible to implement normal culling task on this Global as I noticed this global content is not accessible via SQL functionality in Management page but only via the Globals in Management portal.
Thank you for your help.
Comments
Out of curiosity, was the system upgraded from a Cahcé based product? (Ensemble, HealthShare etc.)
Enrico
No We have been using HealthShare 2021.1 from last year.
Hello!
I realized as well that this global seems to keep increasing and the purge standard utility doesn't seem to do anything. How did you solve it?
SOLVED: I found out that using this it can be purged:
d ##class(EnsLib.HL7.Message).Purge(.deleted, 7)
Many thanks,
Hey David.
Your solution has caught my attention. What led you to this?
I have just run this against a non-production namespace that had a 30 day retention period and was sat at around 6GB. Running this command with the "pDaysToKeep" parameter set to 30 days has managed to free up 5GB and deleted 92158 messages, where I would have expected to have not deleted anything given the retention period for the purge task and the running of this method were the same.
When you purge that namespace with 30 day retention period, what value of "Purge only completed sessions" (was Keep Integrity in older versions) do you use?
Have you ever run the purge without including message bodies?
Hey Enrico.
The value of KeepIntegrity is set to True. I don't believe we have ever run the purge without including message bodies, but it's a non-production environment so stranger things have happened.
However, I did also just try running ##class(EnsLib.HL7.Message).Purge() in our production environment with the settings matching the retention period there, and it ran for a period, freed up around 5gb and then failed over to the other mirror as running the method consumed all of the ram on the box 😅
This namespace has been around for a long time (started life at around caché/ensemble 2014) and has likely accumulated a lot of baggage. I had a similar problem when trying to run Ensemble Orphaned Messages Purge Routine
If/when you set KeepIntegrity to True, then ALL messages and message headers belonging to a session containing ANY message with status Created or Queued or Delivered or Suspended or Deferred are NOT deleted/purged, same goes for the headers (Ens.MessageHeader).
Since your is a test environment, it's (very?) likely having "messed" sessions that are not purged using KeepIntegrity = True.
Sometimes even production systems do have sessions that are not purged using KeepIntegrity = True.
While setting using KeepIntegrity = True is "best practice" and prevent purging "uncompleted sessions", I suggest to run a purge with KeepIntegrity = False with a (much?) longer DaysToKeep parameter, unless you do need/want to keep uncompleted sessions and messages for.....ever and ever.
For example, if you purge with KeepIntegrity = True and DaysToKeep=30, you may run a second purge with KeepIntegrity = false and DaysToKeep=90 (or longer) to purge really old messages belonging to "uncompleted" sessions.