[
https://issues.apache.org/jira/browse/HBASE-11817?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jean-Marc Spaggiari resolved HBASE-11817.
-----------------------------------------
Resolution: Fixed
Release Note: Was able to reproduce on 0.98, but not anymore on 1.0.2. Most
probably solved by another JIRA.
> 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.4.14#64029)