You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@bookkeeper.apache.org by GitBox <gi...@apache.org> on 2021/03/22 03:18:00 UTC

[GitHub] [bookkeeper] baomingyu opened a new issue #2655: bookie will be down (out of memory), when there are a lots of ledgers under /ledgers/underreplication/ledgers to replication

baomingyu opened a new issue #2655:
URL: https://github.com/apache/bookkeeper/issues/2655


   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)
   
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [bookkeeper] baomingyu commented on issue #2655: bookie will be down (out of memory), when there are a lots of ledgers under /ledgers/underreplication/ledgers to replication

Posted by GitBox <gi...@apache.org>.
baomingyu commented on issue #2655:
URL: https://github.com/apache/bookkeeper/issues/2655#issuecomment-804523313


   For this question , I find LedgerOpenOp.java -> openWithMetadata function may be have one bug.
   such as :
   First step:
   it create one object of  ReadOnlyLedgerHandle class , and it will register listener use this object:
   ![image](https://user-images.githubusercontent.com/8108604/112080105-54ef1800-8bbc-11eb-85a1-288a351be5a3.png)
   ![image](https://user-images.githubusercontent.com/8108604/112080196-7f40d580-8bbc-11eb-9b62-158ffb1f16de.png)
   Second step , in this exception branch, this object in listeners is not removed away:
   ![image](https://user-images.githubusercontent.com/8108604/112080601-41907c80-8bbd-11eb-8984-37d9c0a0abf6.png)
   
   so ,I think ,it will be changed using such way:
   ![image](https://user-images.githubusercontent.com/8108604/112080693-6389ff00-8bbd-11eb-8508-eb5685735347.png)
   
   
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org