Uploaded image for project: 'CDAP'
  1. CDAP
  2. CDAP-14044

Metrics delete should not use a wildcard match on the tags

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.1.0
    • Component/s: Metrics
    • Labels:
      None
    • Rank:
      1|i00g53:

      Description

      When we delete the metric, we use an wildcard match to delete, which means if an aggregation group contains the entity, all the metrics gets removed. This is not a correct behavior, for example, if I have an aggregation group contains {ns, app, program, dataset} for metrics that each program writes to the dataset, and I have another aggregation group contains {ns, dataset, app, program} for metrics about dataset operations. If the app is deleted, the metrics for both aggregation groups will get deleted. This is an expected behavior because we expect the second aggregation group is supposed to be associated with the dataset. App deletion should not affect it.

      To fix this, we should not do a wildcard match when we delete the metrics. Instead, we should use the prefix match of the aggregation group because the prefix actually identifies what this metrics is about. To delete an app, we only delete metrics with {ns, app} as a prefix of the aggregation group. For profile metrics, the prefix will be {profilescope, profile, namespace}, so the profile metrics will not be deleted upon an app deletion.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                yaojie Yaojie Feng
                Reporter:
                yaojie Yaojie Feng
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: