Question
Guilherme Koerber · Sep 9

Default Purge Does Not Delete Streams

Hello community!

I'm facing a base growth issue, which is being generated by a process and an Ensemble feature.

When executing the process of cleaning up the message queues, the Ensemble “preserves” the Streams that were part of these messages, deleting only the Header and Body. In this way the database (of one of the namespaces) has grown around 60GB per day, which has been maxing out the disk capacity.

InterSystems informed that this is a characteristic and that it is explained in the documents mentioned below.

https://community.intersystems.com/post/ensemble-orphaned-messages

And also in this part of the documentation: https://cedocs.intersystems.com/ens201812/csp/docbook/DocBook.UI.Page.cl...

I think the procedure is to implement the removal of these stream objects in the %OnDelete() method of the class referring to this message, but the complexity of this message makes this specific property not reached by the standard purge. A stream is not exactly what is in the content, because inside it you can have fields of type Stream, GlobalCharacterStream, etc.

It is these fields that he does not delete and he should delete. As I understand the data is inside a global called ^CacheStream and from there they are never deleted.

With this, I'm having difficulties in knowing what's inside it, what's in each interface and what's still being used. Since it has no direct connection with Stream classes.

Has anyone had a problem so they can help me?

Thank you very much in advance,

Guilherme Koerber.

 
Product version: Ensemble 2018.1
10
2 0 2 121
Log in or sign up to continue

Yes we have faced this issue with CacheStream global growing out of control. We have had to create custom purge utilities to clean this data up as well as making sure any of our persistent classes that leverage a Stream class will trigger deletes on the stream when our record is deleted.

You would think the product would be able to handle this as part of cleanup of Ens.messageHeader, but alas that is not the case.

Guilherme,

We also facing this issue.

We create a custom purge method %OnDelete and Trigger  Delete at Persistent related classes used by Ens.Request/Ens.Response. This also deletes Stream objects.

The difficult to cleanup streams located at ^CacheStream or ^Ens.MessageBodyS is that they don't have any information about their "father", so you have to see what classes/routines uses GlobalStream*.

Sometimes you can use stream.CopyFromAndSave method, and don't use this class as message. So it will be persistent forever.

Regards