Hello all,
Just wanted to confirm something about tracking changes with the /changes
API endpoint.
When the database is set to “Recycle”, are the automated deletions tracked by /changes
?
I don’t seem to be able to see this in my changes. I can’t seem to be able to filter by ChangeType (would this be a relevant feature?).
Thanks!
Sylvain
Hello Sylvain,
Actually, all changes related to a resource are deleted when the resource is deleted. The only way to catch a “DELETE” event is through a lua callback.
And, concerning the filtering of changes by type, the feature has already been implemented in the find-refactoring
branch and will be part of 1.12.5.
Best regards,
Alain.
1 Like
Ah, thanks a lot for your prompt response, Alain!
Do you think it would make sense to enable a configurable change tracking for deleted datasets?
Great to hear that the filtering is nearly there !
Best,
Sylvain
We have 2 issues with that:
- DELETE changes would accumulate in the DB and consume space (that should not be an issue on a regular system but could be an issue when Orthanc is acting as a buffer/forwarder and is not keeping the data)
- Right now, the
Changes
table has a foreign key to the Resources
table with a cascading delete → we would have to change the DB schema which we prefer to avoid as much as possible
However, I understand the need for monitoring DELETE events e.g when you want to synchronize 2 Orthanc instances.
In this project, we are using a RabbitMQ queue to post the DELETE events from the lua callback in order to replicate the DELETE on the second Orthanc instances.
Hope this helps,
Alain