hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jean-Marc Spaggiari (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-11817) HTable.batch() loses operations when region is splited
Date Tue, 26 Aug 2014 01:04:22 GMT

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

Jean-Marc Spaggiari commented on HBASE-11817:
---------------------------------------------

So. 

If I run the increments only, no issues. And if after some time I run the splits, no issues.
But is splits arrive shortly after the increments, then some increments are dropped. 

I tried to flush and major compact with no better result.

So, issue confirmed. Now, we need to understand where it comes from. I think issue is when
we trigger a split while there is still increments in the memstore. They are not flushed,
then lost.

I will try to redo the same test in DEBUG mode and see if I can detect anything...

> HTable.batch() loses operations when region is splited
> ------------------------------------------------------
>
>                 Key: HBASE-11817
>                 URL: https://issues.apache.org/jira/browse/HBASE-11817
>             Project: HBase
>          Issue Type: Bug
>          Components: Admin, Client
>    Affects Versions: 0.98.4
>         Environment: 0.98.4+hadoop 2.4.1, 0.98.4 stand-alone, jdk1.6
>            Reporter: t samkawa
>
> Using HTable.batch() often loses increment operation when region split ran.
> Test code snpipet is below; 
> Running this 2 code blocks concurrently, different values were often recoreded although
all value should be same 0xffff.
> {code}
> // --- code 1 ---
> HTable table = new HTable(CONF);
> byte[] rowKey = new byte[1];
> for (int i=0;i<0xffff;i++){
>  ArrayList<Increment> operations = new ArrayList<Increment>();
>  for (byte c1 = (byte)'A'; c1<=(byte)'Z'; c1++) {
>    rowKey[0] = c1;
>    Increment opIncr = new Increment(rowKey);
>    opIncr.addColumn(FAM, HConstants.EMPTY_BYTE_ARRAY, 1);
>    operations.add(opIncr);
>  }
>  table.batch(operations, null);
> }
> // -- code2 --
> HBaseAdmin admin = new HBaseAdmin(CONF);
> byte[] rowKey = new byte[1];
> for (byte c1 = (byte)'A'; c1<=(byte)'Z'; c1++) {
>  try { Thread.sleep(2000L); } catch (InterruptedException iex) {}
>  rowKey[0] = c1;
>  admin.split(TABLE_NAME, rowKey);
> }
> /////
> {code}
> Using table.increment() instead of table.batch() works fine. But that change gets slower
. 



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

Mime
View raw message