Skip to content

[broker] Cursor status has always been SwitchingLedger and pendingMarkDeleteOps has accumulated tens of thousands of requests #16859

Closed

Description

@poorbarcode

Describe the bug
The pendingMarkDeleteOps has accumulated tens of thousands of requests, and the cursor status has always been SwitchingLedger, and the retention cannot be executed, resulting in the situation that the disk space cannot be reclaimed.

Screenshots
181666034-f073360f-1f09-4261-95d9-4cdcac255aa8

Activity

  1. added
    type/bug
    on Jul 29, 2022
  2. poorbarcode commented on Jul 29, 2022

    @poorbarcode
    ContributorAuthor

    Hi @keyboardbobo

    Could you please provide the version used? If possible, you can upload the dump file ( High light which may cause data leakage of the company ).

    Could you show the property ManagedCursorMXBean mbean of this Cursor ?

  3. keyboardbobo commented on Jul 29, 2022

    @keyboardbobo

    @poorbarcode My version is 2.9.2, the dump file is very large, and it is difficult to upload it on the intranet due to security reasons. The values of the ManagedCursorMXBean mbean are as follows:

    persistLedgeSucceed:cellsBusy=0,base=63308,cells:null
    persistLedgeFailed:cellsBusy=0,base=1,cells:null
    persistZookeeperSucceed:cellsBusy=0,base=1,cells:null
    persistZookeeperFailed:cellsBusy=0,base=0,cells:null
    writeCursorLedgerSize:cellsBusy=0,base=3437666,cells:null
    writeCursorLedgerLogicalSize:cellsBusy=0,base=1718833,cells:null
    readCursorLedgerSize:cellsBusy=0,base=9,cells:null

  4. poorbarcode commented on Jul 29, 2022

    @poorbarcode
    ContributorAuthor

    Hi @keyboardbobo

    I now suspect that something is wrong with the pendingMarkDeletedSubmittedCount. Could you show the property ManagedCursorImpl.pendingMarkDeletedSubmittedCount ?

  5. keyboardbobo commented on Jul 29, 2022

    @keyboardbobo

    Hi @keyboardbobo

    I now suspect that something is wrong with the pendingMarkDeletedSubmittedCount. Could you show the property ManagedCursorImpl.pendingMarkDeletedSubmittedCount ?

    pendingMarkDeletedSubmittedCount =0

  6. poorbarcode commented on Jul 29, 2022

    @poorbarcode
    ContributorAuthor

    Hi @keyboardbobo

    pendingMarkDeletedSubmittedCount =0

    Thanks, then it is not pendingMarkDeletedSubmittedCount's problem. Is there any other error log?

  7. keyboardbobo commented on Jul 29, 2022

    @keyboardbobo

    @poorbarcode
    At that time, an abnormal scenario with a large network delay from the broker to the bookie was simulated, and there were many errors similar to the following:

    Write of ledger entry to quorum failed
    NotEnoughBookiesException: Not enough non-faulty bookies available
    UpdateLoop(ledgerId=2780774,loopId=54e667fe) Exception updating

    Then the disk space increases, and some partitions cannot be reclaim.

  8. poorbarcode commented on Jul 29, 2022

    @poorbarcode
    ContributorAuthor

    Hi @keyboardbobo

    there were many errors similar to the following:

    Could you show more detail about the error log?

  9. keyboardbobo commented on Jul 29, 2022

    @keyboardbobo
  10. keyboardbobo commented on Aug 1, 2022

    @keyboardbobo

    @poorbarcode I found that there are thousands of tasks in the "BookKeeperClientWorker-OrderedExecutor-59-%d" thread group, and I don't know what caused it. SafeRunnable should catch the exception, but I don't know why this happens
    4EBC67CE-742F-4DC7-AB8E-4BF189D5FFCB

  11. poorbarcode commented on Aug 1, 2022

    @poorbarcode
    ContributorAuthor

    Hi @keyboardbobo

    I found that there are thousands of tasks in the "BookKeeperClientWorker-OrderedExecutor-59-%d" thread group, and I don't know what caused it. SafeRunnable should catch the exception, but I don't know why this happens

    OrderedExecutor used in these is used in the following three scenarios:

    • Write Bookie
    • Read Bookie
    • Send messages to the client

    @hangc0276 Is it normal to have so many tasks in the queue?

  12. keyboardbobo commented on Aug 1, 2022

    @keyboardbobo

    @poorbarcode
    I took a look at some thread groups. Other thread groups are all 0. Only this one has a backlog of more than 7,000 tasks.

  13. keyboardbobo commented on Aug 1, 2022

    @keyboardbobo

    @poorbarcode The stack of the three threads of this thread group is as follows:
    82460ACC-897B-4F3E-A891-0EBF74C94D09

  14. poorbarcode commented on Aug 1, 2022

    @poorbarcode
    ContributorAuthor

    Hi @keyboardbobo

    The stack of the three threads of this thread group is as follows:

    It seems that one topic is busy while others are not, but this seems have not related to the cursor state always being SwitchingLedger or maybe I didn't understand enough to realize the problem

  15. keyboardbobo commented on Aug 1, 2022

    @keyboardbobo

    @poorbarcode I suspect that when SwitchingLedger, some tasks are blocked in the queue, which makes it impossible to complete the execution.

    It seems that one topic is busy while others are not, but this seems have not related to the cursor state always being SwitchingLedger or maybe I didn't understand enough to realize the problem

  16. poorbarcode commented on Aug 2, 2022

    @poorbarcode
    ContributorAuthor

    Hi @keyboardbobo

    Could you provide the BK configuration?

    • Ensemble size
    • Write quorum size
    • Ack quorum size

    E.g. Ensemble size = 3, and Write quorum size = 3, When any bookie server does not work, the first write request will timeout, and other requests will backlog

  17. keyboardbobo commented on Aug 2, 2022

    @keyboardbobo

    @poorbarcode

    managedLedgerDefaultEnsembleSize=3
    managedLedgerDefaultWriteQuorum=3
    managedLedgerDefaultAckQuorum=2
    

    If bookie is not working, should all thread pools be backlogged, not just that thread pool?

  18. github-actions commented on Sep 2, 2022

    @github-actions

    The issue had no activity for 30 days, mark with Stale label.

  19. keyboardbobo commented on Oct 8, 2022

    @keyboardbobo

    @poorbarcode There is a new development on the question, but I'm not sure if it's the same problem:
    #17967

  20. github-actions commented on Nov 9, 2022

    @github-actions

    The issue had no activity for 30 days, mark with Stale label.

  21. poorbarcode commented on May 8, 2023

    @poorbarcode
    ContributorAuthor

    This issue might be fixed by #17971

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

    Staletype/bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions