Purge external storage and preserve dependencies
Based on previous implementation of @ArtificialOwl.
Fixes #176
@ArtificialOwl could you please review the PR for purge improvement of external storage? thanks in advance.
I believe this logic is going to result in the same orphaning problem we already see. Please see Pull #219
The purge logic of my PR is quite simple: It just sorts the external points from newest to oldest, keeps the newest x points as configured, and in case of differential points it remembers the related parents of that items. Then the remaining items are deleted one after another if they are not in the "parents to remember" list. So the needed parent items are save from purging process. I have a separate NC test instance and tested it extensively, also it runs in my productive instance. @jxmx What are your indications it would result in same orphaning problem as before?
I see the logic now. Are you going to replace my #183 with the same logic then?
Hello @Vrumf0ndel
Thanks for your contribution, code looks good.
Can you please rebase it on master, or do you need #151 ?