apache / apache/bookkeeper

ByteBuf returned by BookKeeper triggers CRC Checksum calculation when calling "readBytes"

Open
#4,372 6 comments 0 reactions 0 assignees View on GitHub
type/bug
Dominant language
Java
Stars
2k
Forks
976
Avg merge
6d 15h
Merged PRs (30d)
7

Description

**BUG REPORT**

***Describe the bug***
I have developting a Pulsar BrokerInterceptor. The BrokerInterceptor is able to process the data that Pulsar read from BookKeeper, without memory copies.
While analysing a flamegraph I have seen that the ByteBuf returned by BookKeeper shows this weird behaviour and uses lot of CPU.

This is a flame graph. The version of BookKeeper is based on latest 4.16.x

![image](https://github.com/apache/bookkeeper/assets/9469110/2e019824-48bb-4839-a0b8-49a01036b54e)

***To Reproduce***

See the flamegraph

***Expected behavior***

readBytes has very little overhead

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.