Skip to content

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

@1559924775

Description

@1559924775

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

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