Skip to content
This repository was archived by the owner on Jan 24, 2024. It is now read-only.

[BUG] Ledger id used up quickly #175

@aloyszhang

Description

@aloyszhang

Describe the bug
The offset of kakfa map to messageId of pulsar by splitting 64 bits (a long type) to three parts, 20 bits for ledgerId , 32 bits for entryId and 12 bits for batchIndex , therefor, ledgerId can't be larger than (2^19 - 1) since long type is signed.
If we have lost of topics or partitions, ledgerId will be overflow very soon.
Besides, entryId has 32 bits, but pulsar ledger will rollover for every 50000 entries by default. Most of entryId space will waste if ledger rolled .
In my opinion, we should re-assign the bits for ledgerId and entryId to make kop have enough range for ledgerId . I have redistribute the ledgerId with 35 bits, entryId with 17 bits and batchIndex with 12 bits.
@sijie @jiazhai Is there any better way to resolve this problem ? Any suggestions will be appreciated.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions