apache / apache/bookkeeper

bookie will be down (out of memory), when there are a lots of ledgers under /ledgers/underreplication/ledgers to replication

Open
#2,655 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
2k
Forks
976
Avg merge
6d 15h
Merged PRs (30d)
7

Description

why is there many times register ,that will make bookie out of memory

When i change 3 3 2 to 2 2 2 after reduce bookie nodes from 5 to 2
ZK has a lots of ledgers mate data infos, and the 2 bookie nodes had old data.
Running bookies cluster that has two nodes, without running any producers or consumers.
some minutes or hours later , watching the memory info of one bookie using jstat:
![image](https://user-images.githubusercontent.com/8108604/111727740-742d3300-88a6-11eb-84c0-3ae89991a78c.png)

and dump info using mat
![image](https://user-images.githubusercontent.com/8108604/111727118-3ed41580-88a5-11eb-9c88-6b52ebbc0947.png)
the class ReadOnlyLedgerHandle will register a listener to AbstractZkLedgerManager's listeners field when init. some times later listeners filed will occupy a lot of heap memory
![image](https://user-images.githubusercontent.com/8108604/111727263-822e8400-88a5-11eb-9f4e-674c81a1b856.png)

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.