[
https://issues.apache.org/jira/browse/HBASE-4583?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13489600#comment-13489600
]
Lars Hofhansl commented on HBASE-4583:
--------------------------------------
The problem this fixes is how Increments/Appends interact with *other*
operations.
There are two problems:
# A race between a prior Put and a following Increment. The Increment might not
see the latest state generated by the Put.
# An increment that updates multiple columns on a row can cause a concurrent
scanner to see partially applied rows. The specifics here are that in order to
make Increments strictly serializable upsert used to set the memstoreTS to 0,
making the change visible immediately to all concurrent and future scanners.
As long as only increments are used and you do not care for partially applied
rows, the current code is correct.
#1 is fixed by having the Increment wait for prior MVCC transactions with the
lock held.
#2 is fixed by either getting rid of upsert altogether (the "radical" version
of this patch, which incurs the 10% overhead you measured) or make upsert MVCC
aware (the "less radical" version of this patch, which should only incur
minimal overhead).
The objective of the "radical" patch was to fix these problems and to also get
rid of a lot of code specific to increment (and which also breaks the VERSIONS
contract).
The "less radical" patch fixes the issues by fixing upsert to be MVCC aware.
TL;DR: I'm happy with either patch, slightly leaning towards the "radical"
version. But I think you're right that the current Increment performance is now
expected, so the "less radical" version is probably the way to go.
> Integrate RWCC with Append and Increment operations
> ---------------------------------------------------
>
> Key: HBASE-4583
> URL: https://issues.apache.org/jira/browse/HBASE-4583
> Project: HBase
> Issue Type: Bug
> Reporter: Lars Hofhansl
> Assignee: Lars Hofhansl
> Fix For: 0.96.0
>
> Attachments: 4583-trunk-less-radical.txt,
> 4583-trunk-less-radical-v2.txt, 4583-trunk-less-radical-v3.txt,
> 4583-trunk-less-radical-v4.txt, 4583-trunk-less-radical-v5.txt,
> 4583-trunk-less-radical-v6.txt, 4583-trunk-radical.txt,
> 4583-trunk-radical_v2.txt, 4583-trunk-v3.txt, 4583.txt, 4583-v2.txt,
> 4583-v3.txt, 4583-v4.txt
>
>
> Currently Increment and Append operations do not work with RWCC and hence a
> client could see the results of multiple such operation mixed in the same
> Get/Scan.
> The semantics might be a bit more interesting here as upsert adds and removes
> to and from the memstore.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira