Skip to content

[FEATURE] Support triggering ledger rollover when maxLedgerRolloverTimeMinutes is met #7184

Closed

Description

@wuzhanpeng

Motivation

Now in the ManagedLedger, even if the maxLedgerRolloverTimeMinutes is reached, the topic ledger will not trigger a new rollover until the next entry comes in. Thus the configuration does not actually take full effect. Another important idea here is, if we trigger a rollover, we can close the current ledger so that we can release the storage of current ledger btw. Because for some less commonly used topics, the current ledger data is likely to have expired, and the current rollover logic will only be triggered when adding a new entry. Obviously, this will result in a waste of disk space.

Is your feature request related to a problem? Please describe.
In current code logic the last created topic ledger will be never removed beacause the trimming stratege will not remove the current ledger. In such scenario, we will maintain a lot of useless data if the topic is no longer being used. Moreover, it may cause disk problem if we keep a lot mount of discarded topics in the cluster.
Maybe related to #6935

Describe the solution you'd like
Add a new checker thread in BrokerService or ManagedLedger to periodically check if the current ledger is full.

Activity

  1. added
    type/feature
    on Jun 5, 2020
  2. added a commit that references this issue on Jun 8, 2020
    fa2da42
  3. added a commit that references this issue on Jul 24, 2020
    2e1648b
  4. added a commit that references this issue on Aug 24, 2020
    2a91c40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    type/feature

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions