Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reset metric name lookup table when another worker deletes a metric #171

Merged
merged 4 commits into from
Apr 22, 2024

Commits on Mar 13, 2024

  1. Restructure integration test

    Make it easier to define multiple tests and run them concurrently.
    knyar committed Mar 13, 2024
    Configuration menu
    Copy the full SHA
    549ab5f View commit details
    Browse the repository at this point in the history

Commits on Apr 17, 2024

  1. Add a metric reset test

    This test verifies that:
    - a gauge metric that has been reset is no longer reported;
    - a previously-reset metric that is used again correctly reports its
      values.
    knyar committed Apr 17, 2024
    Configuration menu
    Copy the full SHA
    abad483 View commit details
    Browse the repository at this point in the history
  2. Reset metric name lookup table when another worker resets the metric

    The metric key index now accepts a function that gets called every time
    a key is deleted from the index, which happens at the next sync after
    another worker had deleted a key. The callback function finds the same
    metric in the local worker's registry and cleans up its lookup table.
    
    To make sure this happens deterministically for all workers, the key
    index sync is now also scheduled to run every `sync_interval` (1s
    by default).
    
    The goals are:
    - to prevent unbounded growth of the per-metric lookup tables;
    - to ensure that previously reset metrics can be used again.
    knyar committed Apr 17, 2024
    Configuration menu
    Copy the full SHA
    49c8087 View commit details
    Browse the repository at this point in the history
  3. Remove size limit for per-metric lookup tables

    Size based cleanup was added to avoid unbounded growth of lookup tables
    as metrics get deleted/reset. This should not be necessary now when lookup
    tables are being reset on metric deletion.
    
    This reverts eb1876d
    knyar committed Apr 17, 2024
    Configuration menu
    Copy the full SHA
    bee53e4 View commit details
    Browse the repository at this point in the history