[DBCleaner] Deleted 0 eSpace versions.

[DBCleaner] Deleted 0 eSpace versions.

  
Forge Component
(28)
Published on 16 Aug by Mika Roivainen
28 votes
Published on 16 Aug by Mika Roivainen
I'm running Outsystems Version 9.1.0.20, and DB Cleaner Version 1.7.1.

When I run Delete Old eSpace Versions on 22 week timeline I have Number Of Versions: 69 & Total Size 1,660.7 MiB.

It runs for several minutes like it's actually deleting things, and I receive the success (blue) message of 
Deleted 0 eSpace versions.


Older espace versions were deleted but I guess I reached a point where they're the newer espaces?

I have deleted the entire espace (previously was running an older version) and reinstalling 1.7.1, and it still wont delete more recent espaces.... Is there some limitation or database value I'm missing?

Thanks,
Braxton
Same problem.
The "Delete Old eSpace Versions" does not delete any eSpace and always shows the info:
"Deleted 0 eSpace versions."

On the server Monitoring I get this errors regarding the DBCleaner app:

The DELETE statement conflicted with the REFERENCE constraint "OSFRK_OSSYS_APP_VERSION_MODULE_VERSI_OSSYS_ESPACE_VERSION_ESPACE_VERSION_ID". The conflict occurred in database "B3XILR020", table "dbo.OSSYS_APP_VERSION_MODULE_VERSI", column 'ESPACE_VERSION_ID'.
The statement has been terminated.

PS:
- OutSystems Platform 9.1.0.20
- Personal Environment
- DBCleaner 1.7.1
Solution
Hello Carlos,

You are having the same issue as Vania was having originally on http://www.outsystems.com/forums/discussion/14691/error-application-db-cleaner/ 

Please note that this application does a best-effort to identify what it can delete. In order to be able to display how much database space, I am not able to use the DBCleaner_API (plus, this existed a bit before the API did :) ).

This means that some internal tables which are not exposed cannot be used to exclude some espace versions that are locked by being tagged in LifeTime. This is what originates the errors you see. DBCleaner jumps through them in order to delete as many old-espace versions as it can.
Solution
Hi all,

After some experimenting with the DBCleaner_API i've created new functionality (in the DBCleaner espace).
There is a bug in DBCleaner_API so it doesn't return much results. This is fixed together with support. Now there is a workaround and I added this into my custom DBCleaner eSpace i use in our environment.

I've added my version of the DBCleaner to this message just check it out.


Peter van den Ochtend wrote:

Hi all,

After some experimenting with the DBCleaner_API i've created new functionality (in the DBCleaner espace).
There is a bug in DBCleaner_API so it doesn't return much results. This is fixed together with support. Now there is a workaround and I added this into my custom DBCleaner eSpace i use in our environment.

I've added my version of the DBCleaner to this message just check it out.


Peter thanks for your version - it definately did work better deleting old eSpace versions.

BUT - I am still stuck. It looks like the eSpace versions are still out there for apps that I uninstalled a while back.

This is what I see on the original DBCleaner:


These items don't show in the list on DBCleaner_Peter ... any clues why I can see these (but can't delete) on DBCleaner - BUT - can't see them on DBCleander_Peter???

Bruce Buttles wrote:

Peter van den Ochtend wrote:

Hi all,

After some experimenting with the DBCleaner_API i've created new functionality (in the DBCleaner espace).
There is a bug in DBCleaner_API so it doesn't return much results. This is fixed together with support. Now there is a workaround and I added this into my custom DBCleaner eSpace i use in our environment.

I've added my version of the DBCleaner to this message just check it out.


Peter thanks for your version - it definately did work better deleting old eSpace versions.

BUT - I am still stuck. It looks like the eSpace versions are still out there for apps that I uninstalled a while back.

This is what I see on the original DBCleaner:


These items don't show in the list on DBCleaner_Peter ... any clues why I can see these (but can't delete) on DBCleaner - BUT - can't see them on DBCleander_Peter???

My change was to use the API with the parameters filled in (there was a bug with DBCleaner_API in the past).

I haven't looked in the code of the original DBCleaner for a while. Is he also using DBCleaner_API or is he directly using the database? Because the DBCleaner_API only returns the non-active, non-tagged (lifetime) versions of the eSpaces.


Peter van den Ochtend wrote:

Bruce Buttles wrote:

Peter van den Ochtend wrote:

Hi all,

After some experimenting with the DBCleaner_API i've created new functionality (in the DBCleaner espace).
There is a bug in DBCleaner_API so it doesn't return much results. This is fixed together with support. Now there is a workaround and I added this into my custom DBCleaner eSpace i use in our environment.

I've added my version of the DBCleaner to this message just check it out.


Peter thanks for your version - it definately did work better deleting old eSpace versions.

BUT - I am still stuck. It looks like the eSpace versions are still out there for apps that I uninstalled a while back.

This is what I see on the original DBCleaner:


These items don't show in the list on DBCleaner_Peter ... any clues why I can see these (but can't delete) on DBCleaner - BUT - can't see them on DBCleander_Peter???

My change was to use the API with the parameters filled in (there was a bug with DBCleaner_API in the past).

I haven't looked in the code of the original DBCleaner for a while. Is he also using DBCleaner_API or is he directly using the database? Because the DBCleaner_API only returns the non-active, non-tagged (lifetime) versions of the eSpaces.



Original DBCleaner is using the delete action of the table and not the DBCleaner_API