← Back to team overview

dhis2-devs team mailing list archive

Obsolete analytics tables are not deleted during analytics update

 

Dear devs,

it seems like the analytics table update does not remove data/tables of years,
that are no longer valid.

Since dataValues can be deleted via api in batch, it can happen that dataValues
for a whole year get deleted. Of course these years should not show up in the
analytics (pivot, chart etc...) any more. However, those obsolete tables seem to
remain in the database after running the analytics update. Of course they could
be remove manually, but this is not applicable in a nightly load scenario. 

I did empty the cache and checked catalina.out, but I can't find an error. In
the database the dataValues table remains with only the years, that were not
deleted, so the deletion obviously worked. But the obsolete analytics tables
(e.g. analytics_2012) are still there and populated. You can verify in the
attached excerpt from catalina.out: only years >= 2016 were (correctly) updated,
deleted years <= 2015 remained untouched.

This is quite serious as it results into wrong statistics, if not detected. I
just discovered this because of a major clean-up activity - if there are only
very few years affected, users might not even notice that they are reporting
deleted data.

Currently running on 2.22, build 21765, Standard Ubuntu 14.04 & OracleJava 8.

Thanks for checking on that,

Uwe

Attachment: catalina.out.2016-02-18
Description: Binary data


Follow ups