Skip to content

Race condition causes metric updates to be lost #132

@pwinckles

Description

@pwinckles

If a metric is updated while QuiescentRegistryListener is restarting PcpMmvWriter due to a monitorable being added, then it's possible that the metric update will be lost. This can happen because the metric update calls PcpMmvWriter.updateMetric(), which immediately returns if started is false. When QuiescentRegistryListener restarts PcpMmvWriter, it first stops it, setting started to false, and then starts it again. PcpMmvWriter.start() iterates over all of the metric data, writing it again, prior to setting started to true. So, the race occurs if a metric is updated between the time the old value is rewritten in PcpMmvWriter.start() and the time started is set to true.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions