Orphaned metrics and metrics data

517
2
Jump to solution
11-09-2023 05:58 PM
TristanMcHardie
Regular Contributor

In our Postgres DB I've noticed there are orphaned metrics and metrics data at 2023.2.

There are nearly 500k orphaned records in the metrics table where the component has been deleted, mostly for services but a handful of storage ones too. There are just over 8k valid metrics.

Also, there are over 13M records in the metrics_data table where the metric has been deleted. This is about 1.6% of the entire table.

It would appear that the upstream deletes haven't cascaded at some AGM version. Perhaps this was caused by bugs that have subsequently been fixed so no further orphans are created, but the existing orphans haven't been cleaned up.

I haven't checked anywhere else in the DB if there are other examples of orphaning.

Is this a known issue and will future versions clean this up?

0 Kudos
1 Solution

Accepted Solutions
EsriEvan
Esri Contributor

Hi Tristan,

Thanks for pointing this out. This is a known issue for the dev team but I'll try to elaborate the nuance: 

- orphaned metrics_data are expected and will be ultimately cleaned up as part of the data retention policy. This was a design choice made to keep massive deletes to a minimum.

- orphaned metrics are not expected and this is the known issue which presents specifically when a sub-component is deleted (such as a Map Service or Disk) - its metric references continue to remain. Same thing happens with alerts. Dev team is working on this ASAP

View solution in original post

2 Replies
EsriEvan
Esri Contributor

Hi Tristan,

Thanks for pointing this out. This is a known issue for the dev team but I'll try to elaborate the nuance: 

- orphaned metrics_data are expected and will be ultimately cleaned up as part of the data retention policy. This was a design choice made to keep massive deletes to a minimum.

- orphaned metrics are not expected and this is the known issue which presents specifically when a sub-component is deleted (such as a Map Service or Disk) - its metric references continue to remain. Same thing happens with alerts. Dev team is working on this ASAP

TristanMcHardie
Regular Contributor

Thanks Evan, understood re both tables. Thanks for the great explanation.

0 Kudos