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

Duo Zhang commented on HBASE-19731:
-----------------------------------

[~stack] I think the problem is we assigned the same timestamp twice.

I added a static tsAssigned field in HRegion

{code}
  public static volatile List<Long> tsAssigned;
{code}

And in MutationBatchOperation.prepareMiniBatchOperations, I did this
{code}
      if (!region.getRegionInfo().isMetaRegion() && HRegion.tsAssigned != null) 
{
        HRegion.tsAssigned.add(timestamp);
      }
{code}

And I also modified the UT
{code}
  @Test
  public void test() throws IOException {
    try {
      for (int i = 0; i < 100; i++) {
        testCheckAndDeleteWithCompareOp();
        TEST_UTIL.deleteTable(TableName.valueOf(name.getMethodName()));
        HRegion.tsAssigned = null;
      }
    } catch (AssertionError e) {
      HRegion.tsAssigned.forEach(System.out::println);
      throw e;
    }
  }
{code}

Notice that I will create HRegion.tsAssigned in testCheckAndDeleteWithCompareOp 
after the creation of the test table.

And finally I got this output
{noformat}
1515397552529
1515397552533
1515397552535
1515397552537
1515397552539
1515397552541
1515397552543
1515397552546
1515397552547
1515397552548
1515397552549
1515397552550
1515397552551
1515397552554
1515397552555
1515397552556
1515397552556
{noformat}

You can see that the test fails immediately after we issue the same ts again.

This means we are doing faster mutation for beta1 so it is more easier to run 
into this situation? Maybe a good news...

> TestFromClientSide#testCheckAndDeleteWithCompareOp and testNullQualifier are 
> flakey
> -----------------------------------------------------------------------------------
>
>                 Key: HBASE-19731
>                 URL: https://issues.apache.org/jira/browse/HBASE-19731
>             Project: HBase
>          Issue Type: Sub-task
>          Components: test
>            Reporter: stack
>            Assignee: stack
>            Priority: Critical
>             Fix For: 2.0.0-beta-2
>
>
> These two tests fail frequently locally; rare does this suite pass.
> The failures are either of these two tests.  Unfortunately, running the test 
> standalone does not bring  on the issue; need to run the whole suite.
> In both cases, we have a Delete followed by a Put and then a checkAnd* -type 
> operation which does a Get expecting to find the just put Put but it fails on 
> occasion.
> Looks to be an mvcc issues or Put going in at same timestamp as the Delete. 
> Its hard to debug given any added logging seems to make it all pass again.
> Seems this too is new in beta-1. Running tests against alpha-4 seem to pass.
> Doing a compare....



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to