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

Hadoop QA commented on HBASE-11302:
-----------------------------------

{color:red}-1 overall{color}.  Here are the results of testing the latest 
attachment 
  http://issues.apache.org/jira/secure/attachment/12648632/HBase-11302-0.99.diff
  against trunk revision .
  ATTACHMENT ID: 12648632

    {color:green}+1 @author{color}.  The patch does not contain any @author 
tags.

    {color:red}-1 tests included{color}.  The patch doesn't appear to include 
any new or modified tests.
                        Please justify why no new tests are needed for this 
patch.
                        Also please list what manual steps were performed to 
verify this patch.

    {color:green}+1 javac{color}.  The applied patch does not increase the 
total number of javac compiler warnings.

    {color:green}+1 javadoc{color}.  The javadoc tool did not generate any 
warning messages.

    {color:green}+1 findbugs{color}.  The patch does not introduce any new 
Findbugs (version 1.3.9) warnings.

    {color:green}+1 release audit{color}.  The applied patch does not increase 
the total number of release audit warnings.

    {color:green}+1 lineLengths{color}.  The patch does not introduce lines 
longer than 100

  {color:green}+1 site{color}.  The mvn site goal succeeds with this patch.

     {color:red}-1 core tests{color}.  The patch failed these unit tests:
                       org.apache.hadoop.hbase.client.TestMultiParallel
                  
org.apache.hadoop.hbase.regionserver.TestRSKilledWhenInitializing

     {color:red}-1 core zombie tests{color}.  There are 1 zombie test(s):       
at 
org.apache.hadoop.hbase.mapreduce.TestTableMapReduceBase.testMultiRegionTable(TestTableMapReduceBase.java:96)

Test results: 
https://builds.apache.org/job/PreCommit-HBASE-Build/9706//testReport/
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/9706//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-hadoop2-compat.html
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/9706//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-prefix-tree.html
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/9706//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-client.html
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/9706//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-common.html
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/9706//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-protocol.html
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/9706//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-server.html
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/9706//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-examples.html
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/9706//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-thrift.html
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/9706//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-hadoop-compat.html
Console output: 
https://builds.apache.org/job/PreCommit-HBASE-Build/9706//console

This message is automatically generated.

> ReplicationSourceManager is not thread safe
> -------------------------------------------
>
>                 Key: HBASE-11302
>                 URL: https://issues.apache.org/jira/browse/HBASE-11302
>             Project: HBase
>          Issue Type: Bug
>          Components: Replication
>    Affects Versions: 0.99.0, 0.98.2
>            Reporter: Qianxi Zhang
>         Attachments: HBase-11302-0.99.diff
>
>
> In ReplicationSourceManager, sources is used to record the peers. It could be 
> removed in removePeer method, and read in preLogRoll method. it is not thread 
> safe.
> ReplicationSourceManager#296
> {code}
>   void preLogRoll(Path newLog) throws IOException {
>     synchronized (this.hlogsById) {
>       String name = newLog.getName();
>       for (ReplicationSourceInterface source : this.sources) {
>         try {
>           this.replicationQueues.addLog(source.getPeerClusterZnode(), name);
>         } catch (ReplicationException e) {
>           throw new IOException("Cannot add log to replication queue with id="
>               + source.getPeerClusterZnode() + ", filename=" + name, e);
>         }
>       }
>       for (SortedSet<String> hlogs : this.hlogsById.values()) {
>         if (this.sources.isEmpty()) {
>           // If there's no slaves, don't need to keep the old hlogs since
>           // we only consider the last one when a new slave comes in
>           hlogs.clear();
>         }
>         hlogs.add(name);
>       }
>     }
>     this.latestPath = newLog;
>   }
> {code}
> ReplicationSourceManager#392
> {code}
>   public void removePeer(String id) {
>     LOG.info("Closing the following queue " + id + ", currently have "
>         + sources.size() + " and another "
>         + oldsources.size() + " that were recovered");
>     String terminateMessage = "Replication stream was removed by a user";
>     ReplicationSourceInterface srcToRemove = null;
>     List<ReplicationSourceInterface> oldSourcesToDelete =
>         new ArrayList<ReplicationSourceInterface>();
>     // First close all the recovered sources for this peer
>     for (ReplicationSourceInterface src : oldsources) {
>       if (id.equals(src.getPeerClusterId())) {
>         oldSourcesToDelete.add(src);
>       }
>     }
>     for (ReplicationSourceInterface src : oldSourcesToDelete) {
>       src.terminate(terminateMessage);
>       closeRecoveredQueue((src));
>     }
>     LOG.info("Number of deleted recovered sources for " + id + ": "
>         + oldSourcesToDelete.size());
>     // Now look for the one on this cluster
>     for (ReplicationSourceInterface src : this.sources) {
>       if (id.equals(src.getPeerClusterId())) {
>         srcToRemove = src;
>         break;
>       }
>     }
>     if (srcToRemove == null) {
>       LOG.error("The queue we wanted to close is missing " + id);
>       return;
>     }
>     srcToRemove.terminate(terminateMessage);
>     this.sources.remove(srcToRemove);
>     deleteSource(id, true);
>   }
> {code}



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to