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

Zheng Hu commented on HBASE-20475:
----------------------------------

I think I found the root cause finally.  the source replicate a batch which 
contains log of a deleted table and a test table,  and we expected that WAL of 
the deleted table(by thrown TableNotFoundException when replicate to peer) will 
block the WAL of the test table,  but in the ReplicatonSink, I found that: 

{code}
      if (!rowMap.isEmpty()) {
        LOG.debug("Started replicating mutations.");
        for (Entry<TableName, Map<List<UUID>, List<Row>>> entry : 
rowMap.entrySet()) {
          batch(entry.getKey(), entry.getValue().values());
        }
        LOG.debug("Finished replicating mutations.");
      }
{code}

The entry from the same batch is ahead of another entry, because of their hash 
code of table name is ahead of another's.   So the WAL of test table may  apply 
to the sink cluster firstly, and then the WAL of deleted table.  that's to say 
WAL of the deleted table won't block the WAL of the test table, finally the UT 
failed. 



 

> Fix the flaky TestReplicationDroppedTables unit test.
> -----------------------------------------------------
>
>                 Key: HBASE-20475
>                 URL: https://issues.apache.org/jira/browse/HBASE-20475
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 2.1.0
>            Reporter: Zheng Hu
>            Assignee: Zheng Hu
>            Priority: Major
>             Fix For: 3.0.0, 2.1.0
>
>
> See 
> https://builds.apache.org/job/HBASE-Find-Flaky-Tests/lastSuccessfulBuild/artifact/dashboard.html



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to