Skip to content

fix(profiler): don't double compress non-delta profiles#3918

Merged
nsrip-dd merged 1 commit into
mainfrom
PROF-12388-fix-double-compression
Aug 27, 2025
Merged

fix(profiler): don't double compress non-delta profiles#3918
nsrip-dd merged 1 commit into
mainfrom
PROF-12388-fix-double-compression

Conversation

@nsrip-dd

@nsrip-dd nsrip-dd commented Aug 26, 2025

Copy link
Copy Markdown
Contributor

Our non-delta heap, block, and mutex profiles are getting
double-compressed. That is, they are gzip-compressed, and if you
decompress them then you get another gzip-compressed blob, which is in
turn a compressed pprof file.

This is due to a bug introduced by #3529. In that PR we reworked our
compression logic in order to support re-compression (into zstd in
particular). We incorrectly decided whether a given profile type is a
delta profile by just checking whether there are delta values for the
profile type, without checking whether delta profiling is actually enabled.
As a result, when delta profiling is disabled we use the delta profling
enabled logic, where we assume the input data is uncomprossed and then
gzip-compress it.

Our non-delta heap, block, and mutex profiles are getting
double-compressed. That is, they are gzip-compressed, and if you
decompress them then you get another gzip-compressed blob, which is in
turn a compressed pprof file.

This is due to a bug introduced by #3529. In that PR we reworked our
compression logic in order to support re-compression (into zstd in
particular). We incorrectly decided whether a given profile type is a
delta profile by just checking whether there are delta values for the
profile, without checking whether delta profiling is actually enabled.
As a result, when delta profiling is disabled we use the delta profling
_enabled_ logic, where we assume the input data is uncomprossed and then
gzip-compress it.
@pr-commenter

pr-commenter Bot commented Aug 26, 2025

Copy link
Copy Markdown

Benchmarks

Benchmark execution time: 2025-08-26 20:39:42

Comparing candidate commit 62c127f in PR branch PROF-12388-fix-double-compression with baseline commit c7f78ea in branch main.

Found 0 performance improvements and 0 performance regressions! Performance is the same for 24 metrics, 0 unstable metrics.

@nsrip-dd
nsrip-dd marked this pull request as ready for review August 26, 2025 20:30
@nsrip-dd
nsrip-dd requested a review from a team as a code owner August 26, 2025 20:30
@nsrip-dd
nsrip-dd merged commit 35e1174 into main Aug 27, 2025
223 checks passed
@nsrip-dd
nsrip-dd deleted the PROF-12388-fix-double-compression branch August 27, 2025 16:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants