Some CALC BULK and POWER measurements are randomly duplicated during the DB migration process between 2.8.52 and 2.8.157 versions

Hello,

I’ve updated my OpenHistorian version from 2.8.52 to 2.8.157 in order to improve the last released version of GEPDataExtractor (related to the other topic I’ve opened today). During the update, I’ve been invited by the assistant to migrate the openHistorian database (MySQL) from 2.8.52 to 2.8.157 using the usual process (‘upgrade the existing database to the new one’). I’ve noticed that for some CALC data generated months ago (with the BULK Sequence custom adapter (V+ / V- / zero sequence … phase angles and magnitudes stored in the measurements table) and the POWERCALC one) some of the measurements have been (apparently randomly) duplicated. Apparently it’s sometimes the older one, and some other times the newer one that is finally consider as ‘valid’ ; but only one of the two have some values associated in the monitoring > Graphe Real-Time Measurements window.
As examples :
image

For the same PMU :
image
and
image

For these measurements, the following request :
Description like ‘%PMU_1%’ and Description Like ‘%IA Zero Sequence Current Phase Angle%’
returns only one line in the 2.8.52 DB and two in the 2.8.152 DB.

It’s annoying because in Grafana I have now some data missing for the measurements that have been duplicated, loosing some history :
image

Depending on which measurement have 'apparently randomly) been ‘considered’ by openHistorian (older or new duplicateed one), I now have a loss of old data or a loss of new ones :

Could you please investigate on the reason of this issue please ?
I’ve tried to delete from the Measurement table the measure that are not used anymore, but it seems that I can’t retrieve the historical data stored with the previous tag in Grafana.

Thank you very much for considering this issue ; feel free to ask me any question wich could help you to investigate and diagnose this case.

Regards

Stephane.

I am sorry that this happened. In a code investigation, I am not sure what process in the database migration could have caused measurement duplication.

Is it possible that you went the openHistorian web page interface for a device and clicked “Save” again? This would have possible created new measurements if it did not recognize the old tag names.

Did you per-chance run the Tag Name Expression updater tool at the end of the install process? This could have slightly changed tag names such that when saving a device, it thought the tag names no longer existed and created new ones?

Perhaps we can further discuss how it may be possible to converge old data into new tags?

Thanks,
Ritchie