[ 
https://issues.apache.org/jira/browse/HBASE-17314?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15771682#comment-15771682
 ] 

Guanghao Zhang commented on HBASE-17314:
----------------------------------------

{code}
207         if (manager == null) {
208           // It must in a unit test, it is ok to use a local one.
209           this.totalBufferUsed = new AtomicLong();
210         } else {
211           this.totalBufferUsed = manager.getTotalBufferUsed();
212         }
{code}
How about mock a ReplicationSourceManager in the unit test?

> Limit total buffered size for all replication sources
> -----------------------------------------------------
>
>                 Key: HBASE-17314
>                 URL: https://issues.apache.org/jira/browse/HBASE-17314
>             Project: HBase
>          Issue Type: Improvement
>          Components: Replication
>            Reporter: Phil Yang
>            Assignee: Phil Yang
>             Fix For: 2.0.0, 1.4.0
>
>         Attachments: HBASE-17314.branch-1.v01.patch, 
> HBASE-17314.branch-1.v02.patch, HBASE-17314.v01.patch, HBASE-17314.v02.patch, 
> HBASE-17314.v03.patch, HBASE-17314.v04.patch, HBASE-17314.v05.patch, 
> HBASE-17314.v06.patch
>
>
> If we have many peers or some servers have many recovered queues, we will 
> hold many entries in memory which will increase the pressure of GC, even 
> maybe OOM because we will read entries for 64MB to buffer in default for one 
> source.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to