apache / apache/bookkeeper

When the journal directory is even, the journal data is unevenly distributed

Open
#2,974 5 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***

When the journal directory is configured to be even, the ledger allocated to each journal will be uneven. The root cause is that almost all the ledger IDs generated by the LedgerIdGenerator class are even. The number of ZK temporary order nodes is determined by the cversion of the parent node. Whenever a child node is added or deleted, it will increase by 1. The LedgerIdGenerator class uses ZK's temporary order node to generate the ledgerid, and deletes the node immediately after generation. This way of use causes almost all cversions to be even, resulting in all ledgerids to be even.

***To Reproduce***

Steps to reproduce the behavior:
1. Configure in bk_server.conf: jouranlDirectorie=/tmp/bk-txn1,/tmp/bk-txn2
2. production data to bookie

***Expected behavior***

Almost all ledgerids are assigned to directory 1

***Screenshots***

ledgerIdGenerator class : ZKledgerIdGenerator

journal

mathutil

Changing the routing of ledgers to journal directories can fix this bug
mathutilnew

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.