Skip to content

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

@eolivelli

Description

@eolivelli

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

To Reproduce

See the flamegraph

Expected behavior

readBytes has very little overhead

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions