[
https://issues.apache.org/jira/browse/HBASE-6195?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Xing Shi updated HBASE-6195:
----------------------------
Attachment: HBASE-6195-trunk-V4.patch
//In patch v3:
//+ long now = //EnvironmentEdgeManager.currentTimeMillis();
// Integer lid = getLock(lockid, row, true);
//Variable now isn't actually referenced. Do we need it ?
Variable now is used for generate the newKV, V3 generate the Variable also
before the lock, V4 fix it.
//+ //store the kvs to the tmp memory for write hlog first, then write
memory
//The above should read: 'to temporary memstore before writing HLog'
Let me think how to show the problem in UintTest.
> Increment data will be lost when the memstore is flushed
> --------------------------------------------------------
>
> Key: HBASE-6195
> URL: https://issues.apache.org/jira/browse/HBASE-6195
> Project: HBase
> Issue Type: Bug
> Components: regionserver
> Reporter: Xing Shi
> Assignee: ShiXing
> Attachments: HBASE-6195-trunk-V2.patch, HBASE-6195-trunk-V3.patch,
> HBASE-6195-trunk-V4.patch, HBASE-6195-trunk.patch
>
>
> There are two problems in increment() now:
> First:
> I see that the timestamp(the variable now) in HRegion's Increment() is
> generated before got the rowLock, so when there are multi-thread increment
> the same row, although it generate earlier, it may got the lock later.
> Because increment just store one version, so till now, the result will still
> be right.
> When the region is flushing, these increment will read the kv from snapshot
> and memstore with whose timestamp is larger, and write it back to memstore.
> If the snapshot's timestamp larger than the memstore, the increment will got
> the old data and then do the increment, it's wrong.
> Secondly:
> Also there is a risk in increment. Because it writes the memstore first and
> then HLog, so if it writes HLog failed, the client will also read the
> incremented value.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira