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

ramkrishna.s.vasudevan commented on HBASE-19658:
------------------------------------------------

bq.The question is exactly what are those "some cases"? 
You have already answered your question.
bq.However, third cell shouldn't cause in-memory flush. So at the end two cells 
in pipeline and one in active, no flakiness.
It is a classic case of multi threading. 
{code}
    if (this.active.keySize() > inmemoryFlushSize) { // size above flush 
threshold
      if (inWalReplay) {  // when replaying edits from WAL there is no need in 
in-memory flush
        return false;     // regardless the size
      }
{code}
First cell is added the above check fails. Second cell is added the above check 
passes. So 
{code}
  InMemoryFlushRunnable runnable = new InMemoryFlushRunnable();
      if (LOG.isTraceEnabled()) {
        LOG.trace(
          "Dispatching the MemStore in-memory flush for store " + 
store.getColumnFamilyName());
      }
      getPool().execute(runnable);
{code}
So you execute this runnable. the runnable starts running. Now by the time you 
added third cell.
{code}
  try {
        if (LOG.isDebugEnabled()) {
          LOG.debug("IN-MEMORY FLUSH: Pushing active segment into compaction 
pipeline");
        }
        pushActiveToPipeline(this.active);
      } finally {
        getRegionServices().unblockUpdates();
      }
{code}
Now 'this.active' has 3 cells. Now this is where flattening happens. In this 
case your calculation goes wrong. That is why I was asking why to add a third 
cell. Just add 2 cells it will for sure trigger your in memory flush and your 
calculation will never go wrong.  

> Fix and reenable 
> TestCompactingToCellFlatMapMemStore#testFlatteningToJumboCellChunkMap
> --------------------------------------------------------------------------------------
>
>                 Key: HBASE-19658
>                 URL: https://issues.apache.org/jira/browse/HBASE-19658
>             Project: HBase
>          Issue Type: Bug
>          Components: test
>    Affects Versions: 2.0.0-beta-1
>            Reporter: stack
>            Assignee: Anastasia Braginsky
>            Priority: Major
>             Fix For: 2.0.0-beta-2
>
>         Attachments: HBASE-19658-V01.patch, HBASE-19658-V02.patch, 
> HBASE-19658-V03.patch, HBASE-19658-V04.patch, HBASE-19658-V05.patch, 
> HBASE-19658.0007.patch, HBASE-19658.006.patch, HBASE-19658.05.patch, 
> org.apache.hadoop.hbase.regionserver.TestCompactingToCellFlatMapMemStore-output.txt
>
>
> testFlatteningToJumboCellChunkMap was disabled so could commit HBASE-19282 on 
> branch-2. This test is failing reliably. Assigned to [~anastas]. This issue 
> is about fixing the failing test and reenabling it in time for beta-2. Thanks 
> A.



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

Reply via email to