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

Copy labels coming from remote engines #6957

Merged
merged 2 commits into from
Dec 6, 2023

Commits on Dec 4, 2023

  1. Copy labels coming from remote engines

    When running in distributed mode, the remote engine will use an unsafe
    cast from ZLabels to Prometheus labels to avoid making new allocations.
    This makes it hard to use the new gRPC shared buffer pool for receiving
    and decompressing messages since memory gets retained beyond the scope
    of a Recv() call.
    
    This commit removes the unsafe cast and makes an explicit memory copy
    of received series labels. Since remote queries are already aggregated
    series, the amount of data we receive should be small anyway, and the copies
    on average should have a small impact.
    
    Signed-off-by: Filip Petkovski <filip.petkovsky@gmail.com>
    fpetkovski committed Dec 4, 2023
    Configuration menu
    Copy the full SHA
    a4b9652 View commit details
    Browse the repository at this point in the history
  2. Use clone on strings

    Signed-off-by: Filip Petkovski <filip.petkovsky@gmail.com>
    fpetkovski committed Dec 4, 2023
    Configuration menu
    Copy the full SHA
    3329248 View commit details
    Browse the repository at this point in the history