Details
-
Improvement
-
Resolution: Unresolved
-
Minor
-
None
-
None
-
None
Description
Currently, if a pillar is taken out of the repository the pillar's old entries in the integrity-database will still hang around and affect the integrity status reported by integrity-service.
A suggestion to fix this was to simply clear the integrity-database on running a CompleteIntegrityCheck as this will rebuild the database while doing about the same amount of work as usual. However, we can't clear the whole database due to then also deleting history/statistics for ingest in the collection. Instead focus on the fileinfo-table.
So in short: make the first step of CompleteIntegrityCheck run "DELETE FROM fileinfo WHERE pillarid = <removed-pillar>". With this strategy some of the other database's tables will still contain remnants of the removed pillar, but I believe this is okay considering we want to preserve previous statistics for the collection.
Ideally, the pillar-table should also be reset on removing a pillar, as this will otherwise not correspond to the used RepositorySettings, but then again I'm afraid this table is currently not used for anything.. Maybe look into this when solving this issue.