Search before asking
Read release policy
Version
master
Minimal reproduce step
TBD
What did you expect to see?
getting /metrics with gzip compression shouldn't fail
What did you see instead?
it sometimes fails
Anything else?
The problem in the code is here:
|
// write gzip footer, integer values are in little endian byte order |
|
compressBuffer.order(ByteOrder.LITTLE_ENDIAN); |
|
// write CRC32 checksum |
|
compressBuffer.putInt((int) crc.getValue()); |
|
// write uncompressed size |
|
compressBuffer.putInt(deflater.getTotalIn()); |
putInts will fail if the compress buffer doesn't have remaining space.
Are you willing to submit a PR?
Search before asking
Read release policy
Version
master
Minimal reproduce step
TBD
What did you expect to see?
getting /metrics with gzip compression shouldn't fail
What did you see instead?
it sometimes fails
Anything else?
The problem in the code is here:
pulsar/pulsar-broker/src/main/java/org/apache/pulsar/broker/stats/prometheus/PrometheusMetricsGenerator.java
Lines 236 to 241 in 94f6c7c
putInts will fail if the compress buffer doesn't have remaining space.
Are you willing to submit a PR?