You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[broker] Cursor status has always been SwitchingLedger and pendingMarkDeleteOps has accumulated tens of thousands of requests #16859
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.
@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:
I now suspect that something is wrong with the pendingMarkDeletedSubmittedCount. Could you show the property ManagedCursorImpl.pendingMarkDeletedSubmittedCount ?
I now suspect that something is wrong with the pendingMarkDeletedSubmittedCount. Could you show the property ManagedCursorImpl.pendingMarkDeletedSubmittedCount ?
@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.
@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
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?
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
@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
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
Activity
poorbarcode commentedon Jul 29, 2022
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 mbeanof this Cursor ?keyboardbobo commentedon Jul 29, 2022
@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:
poorbarcode commentedon Jul 29, 2022
Hi @keyboardbobo
I now suspect that something is wrong with the
pendingMarkDeletedSubmittedCount. Could you show the propertyManagedCursorImpl.pendingMarkDeletedSubmittedCount?keyboardbobo commentedon Jul 29, 2022
pendingMarkDeletedSubmittedCount=0poorbarcode commentedon Jul 29, 2022
Hi @keyboardbobo
Thanks, then it is not
pendingMarkDeletedSubmittedCount's problem. Is there any other error log?keyboardbobo commentedon Jul 29, 2022
@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:
Then the disk space increases, and some partitions cannot be reclaim.
poorbarcode commentedon Jul 29, 2022
Hi @keyboardbobo
Could you show more detail about the error log?
keyboardbobo commentedon Jul 29, 2022
@poorbarcode

keyboardbobo commentedon Aug 1, 2022
@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

poorbarcode commentedon Aug 1, 2022
Hi @keyboardbobo
OrderedExecutorused in these is used in the following three scenarios:@hangc0276 Is it normal to have so many tasks in the queue?
keyboardbobo commentedon Aug 1, 2022
@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.
keyboardbobo commentedon Aug 1, 2022
@poorbarcode The stack of the three threads of this thread group is as follows:

poorbarcode commentedon Aug 1, 2022
Hi @keyboardbobo
It seems that one topic is busy while others are not, but this seems have not related to the
cursorstate always beingSwitchingLedgeror maybe I didn't understand enough to realize the problemkeyboardbobo commentedon Aug 1, 2022
@poorbarcode I suspect that when SwitchingLedger, some tasks are blocked in the queue, which makes it impossible to complete the execution.
poorbarcode commentedon Aug 2, 2022
Hi @keyboardbobo
Could you provide the BK configuration?
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
keyboardbobo commentedon Aug 2, 2022
@poorbarcode
If bookie is not working, should all thread pools be backlogged, not just that thread pool?
github-actions commentedon Sep 2, 2022
The issue had no activity for 30 days, mark with Stale label.
keyboardbobo commentedon Oct 8, 2022
@poorbarcode There is a new development on the question, but I'm not sure if it's the same problem:
#17967
github-actions commentedon Nov 9, 2022
The issue had no activity for 30 days, mark with Stale label.
poorbarcode commentedon May 8, 2023
This issue might be fixed by #17971